Skip to content

Commit

Permalink
Merge pull request #1 from qmk/master
Browse files Browse the repository at this point in the history
pull new to mine
  • Loading branch information
nikchi authored May 23, 2017
2 parents eb660ef + c7e9e64 commit ec86fac
Show file tree
Hide file tree
Showing 18 changed files with 436 additions and 64 deletions.
21 changes: 7 additions & 14 deletions keyboards/clueboard/keymaps/mac_optimized/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,35 +50,28 @@ const uint16_t PROGMEM fn_actions[] = {

void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
static uint8_t mods_pressed;
static bool mod_flag;

switch (id) {
case 0:
/* Handle the combined Grave/Esc key
*/
mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed

if (record->event.pressed) {
/* The key is being pressed.
*/
mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
if (mods_pressed) {
mod_flag = true;
add_key(KC_GRV);
send_keyboard_report();
register_code(KC_GRV);
} else {
add_key(KC_ESC);
send_keyboard_report();
register_code(KC_ESC);
}
} else {
/* The key is being released.
*/
if (mod_flag) {
mod_flag = false;
del_key(KC_GRV);
send_keyboard_report();
if (mods_pressed) {
mods_pressed = false;
unregister_code(KC_GRV);
} else {
del_key(KC_ESC);
send_keyboard_report();
unregister_code(KC_ESC);
}
}
break;
Expand Down
2 changes: 1 addition & 1 deletion keyboards/clueboard/keymaps/shift_fn/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _FL: Function Layer
*/
[_FL] = KEYMAP(
S(KC_GRV), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), KC_DEL, BL_STEP, \
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), KC_DEL, BL_STEP, \
S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \
S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \
MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \
Expand Down
2 changes: 1 addition & 1 deletion keyboards/clueboard/keymaps/skully/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _FL: Function Layer
*/
[_FL] = KEYMAP(
S(KC_GRV), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), KC_DEL, BL_STEP, \
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), KC_DEL, BL_STEP, \
S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \
S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \
MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \
Expand Down
331 changes: 331 additions & 0 deletions keyboards/ergodox/keymaps/dvorak_programmer_swe/keymap.c

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions keyboards/ergodox/keymaps/dvorak_programmer_swe/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# ErgoDox EZ Dvorak Programmer SWEDISH

Dvorak layout adjusted for a suitable programmer layout and swedish special characters added:

* åäö characters added
* Layout for common vb.net keywords
* Common Visual Studio commands like Save, Build, Debug

TODO:

* (Layer 4 is qwerty (for easier gaming & less fortunate keyboard users)) Like this idea, will add it later on

Known issues:

* Keymap 2 modifier has not gotten its place yet..
* Print screen, where?


## Changelog

* 2017-05-16
* Initial release

# Author
Christian Westerlund
cwesterlund @ github

Thanks to the author of keymap csharp_dev for inspiration!
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
// this is the style you want to emulate.

#include "M10A.h"
#include "m10a.h"
#include "action_layer.h"
#include "eeconfig.h"

Expand Down
2 changes: 1 addition & 1 deletion keyboards/M10A/M10A.c → keyboards/m10a/m10a.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "M10A.h"
#include "m10a.h"

void matrix_init_kb(void) {
matrix_init_user();
Expand Down
File renamed without changes.
File renamed without changes.
35 changes: 12 additions & 23 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
# Quantum Mechanical Keyboard Firmware

[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) [![Gitter](https://badges.gitter.im/qmk/qmk_firmware.svg)](https://gitter.im/qmk/qmk_firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware)
[![Gitter](https://img.shields.io/gitter/room/qmk/qmk_firmware.js.svg)](https://gitter.im/qmk/qmk_firmware)
[![Docs Status](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm)
[![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly)
[![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/)

This is a keyboard firmware based on the [tmk\_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/).
This is a keyboard firmware based on the [tmk\_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR and ARM controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/).

## Official website \(currently under construction with the move to the wiki\)
## Official website

For an easy-to-read version of this document and the repository, check out [http://qmk.fm](http://qmk.fm). Nicely formatted keyboard and keymap listings are also available there, along with the ability to download .hex files instead of having to setup a build environment and compile them.
[http://qmk.fm](http://qmk.fm) is the official website of QMK, where you can find links to this page, the documentation, and the keyboards supported by QMK.

## Included Keyboards
## Supported Keyboards

* [Planck](/keyboards/planck/)
* [Preonic](/keyboards/preonic/)
* [Atomic](/keyboards/atomic/)
* [ErgoDox EZ](/keyboards/ergodox/)
* [Clueboard](/keyboards/clueboard/)
* [Cluepad](/keyboards/cluepad/)
Expand All @@ -21,22 +24,8 @@ The project also includes community support for [lots of other keyboards](/keybo

## Maintainers

QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, [Hasu](https://github.com/tmk). This repo used to be a fork of [TMK](https://github.com/tmk/tmk_keyboard), and we are incredibly grateful for his founding contributions to the firmware. We've had to break the fork due to purely technical reasons - it simply became too different over time, and we've had to start refactoring some of the basic bits and pieces. We are huge fans of TMK and Hasu :\)

This documentation is edited and maintained by Erez Zukerman of ErgoDox EZ. If you spot any typos or inaccuracies, please [open an issue](https://github.com/qmk/qmk_firmware/issues/new).

The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/jackhumbert), the Ergodox EZ by [Erez Zukerman](https://github.com/ezuk), and the Clueboard by [Zach White](https://github.com/skullydazed).

## Documentation roadmap

This is not a tiny project. While this is the main readme, there are many other files you might want to consult. Here are some points of interest:

* [**The Wiki**](https://github.com/qmk/qmk_firmware/wiki) - the entire readme has been moved here
* The readme for your own keyboard: This is found under `keyboards/<your keyboards's name>/`. So for the ErgoDox, it's [here](keyboards/ergodox/); for the Planck, it's [here](keyboards/planck/) and so on.
* The list of possible keycodes you can use in your keymap is actually spread out in a few different places:
* [doc/keycode.txt](doc/keycode.txt) - an explanation of those same keycodes.
* [quantum/quantum\_keycodes.h](quantum/quantum_keycodes.h) - this is where the QMK-specific aliases are all set up. Things like the Hyper and Meh key, the Leader key, and all of the other QMK innovations. These are also explained and documented below, but `quantum_keycodes.h` is where they're actually defined.
* The [TMK documentation](doc/TMK_README.md). QMK is based on TMK, and this explains how it works internally.

QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, [Hasu](https://github.com/tmk). The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/jackhumbert), the Ergodox EZ by [Erez Zukerman](https://github.com/ezuk), and the Clueboard by [Zach White](https://github.com/skullydazed).

## Documentation

[https://docs.qmk.fm](https://docs.qmk.fm) is hosted on [Gitbook](https://www.gitbook.com/book/qmk/firmware/details) and [Github](https://github.com/qmk/qmk_firmware_docs/) (they are synced). You can request changes by making a fork and [pull request](https://github.com/qmk/qmk_firmware_docs/pulls), or by clicking the "suggest an edit" link on any page of the Docs.
4 changes: 4 additions & 0 deletions tmk_core/common/action.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "action_macro.h"
#include "action_util.h"
#include "action.h"
#include "wait.h"

#ifdef DEBUG_ACTION
#include "debug.h"
Expand Down Expand Up @@ -438,6 +439,9 @@ void process_action(keyrecord_t *record, action_t action)
} else {
if (tap_count > 0) {
dprint("KEYMAP_TAP_KEY: Tap: unregister_code\n");
if (action.layer_tap.code == KC_CAPS) {
wait_ms(80);
}
unregister_code(action.layer_tap.code);
} else {
dprint("KEYMAP_TAP_KEY: No tap: Off on release\n");
Expand Down
58 changes: 43 additions & 15 deletions tmk_core/common/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,51 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# include "visualizer/visualizer.h"
#endif

#ifdef MATRIX_HAS_GHOST
extern const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
static matrix_row_t get_real_keys(uint8_t row, matrix_row_t rowdata){
matrix_row_t out = 0;
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
//read each key in the row data and check if the keymap defines it as a real key
if (pgm_read_byte(&keymaps[0][row][col]) && (rowdata & (1<<col))){
//this creates new row data, if a key is defined in the keymap, it will be set here
out |= 1<<col;
}
}
return out;
}

static inline bool popcount_more_than_one(matrix_row_t rowdata)
{
rowdata &= rowdata-1; //if there are less than two bits (keys) set, rowdata will become zero
return rowdata;
}

#ifdef MATRIX_HAS_GHOST
static bool has_ghost_in_row(uint8_t row)
static inline bool has_ghost_in_row(uint8_t row, matrix_row_t rowdata)
{
matrix_row_t matrix_row = matrix_get_row(row);
// No ghost exists when less than 2 keys are down on the row
if (((matrix_row - 1) & matrix_row) == 0)
/* No ghost exists when less than 2 keys are down on the row.
If there are "active" blanks in the matrix, the key can't be pressed by the user,
there is no doubt as to which keys are really being pressed.
The ghosts will be ignored, they are KC_NO. */
rowdata = get_real_keys(row, rowdata);
if ((popcount_more_than_one(rowdata)) == 0){
return false;

// Ghost occurs when the row shares column line with other row
}
/* Ghost occurs when the row shares a column line with other row,
and two columns are read on each row. Blanks in the matrix don't matter,
so they are filtered out.
If there are two or more real keys pressed and they match columns with
at least two of another row's real keys, the row will be ignored. Keep in mind,
we are checking one row at a time, not all of them at once.
*/
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
if (i != row && (matrix_get_row(i) & matrix_row))
if (i != row && popcount_more_than_one(get_real_keys(i, matrix_get_row(i)) & rowdata)){
return true;
}
}
return false;
}

#endif

__attribute__ ((weak))
Expand Down Expand Up @@ -127,7 +155,7 @@ void keyboard_task(void)
{
static matrix_row_t matrix_prev[MATRIX_ROWS];
#ifdef MATRIX_HAS_GHOST
static matrix_row_t matrix_ghost[MATRIX_ROWS];
// static matrix_row_t matrix_ghost[MATRIX_ROWS];
#endif
static uint8_t led_status = 0;
matrix_row_t matrix_row = 0;
Expand All @@ -139,18 +167,18 @@ void keyboard_task(void)
matrix_change = matrix_row ^ matrix_prev[r];
if (matrix_change) {
#ifdef MATRIX_HAS_GHOST
if (has_ghost_in_row(r)) {
if (has_ghost_in_row(r, matrix_row)) {
/* Keep track of whether ghosted status has changed for
* debugging. But don't update matrix_prev until un-ghosted, or
* the last key would be lost.
*/
if (debug_matrix && matrix_ghost[r] != matrix_row) {
matrix_print();
}
matrix_ghost[r] = matrix_row;
//if (debug_matrix && matrix_ghost[r] != matrix_row) {
// matrix_print();
//}
//matrix_ghost[r] = matrix_row;
continue;
}
matrix_ghost[r] = matrix_row;
//matrix_ghost[r] = matrix_row;
#endif
if (debug_matrix) matrix_print();
for (uint8_t c = 0; c < MATRIX_COLS; c++) {
Expand Down
1 change: 0 additions & 1 deletion tmk_core/common/keyboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ static inline bool IS_RELEASED(keyevent_t event) { return (!IS_NOEVENT(event) &&
.time = (timer_read() | 1) \
}


/* it runs once at early stage of startup before keyboard_init. */
void keyboard_setup(void);
/* it runs once after initializing host side protocol, debug and MCU peripherals. */
Expand Down
1 change: 0 additions & 1 deletion util/ergodox_ez.html

This file was deleted.

13 changes: 7 additions & 6 deletions util/travis_compiled_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,19 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then

make ergodox-ez AUTOGEN=true

find . -name ".build" | xargs rm -rf
cd ..
git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git
cd qmk.fm
git submodule update --init --recursive
#git submodule update --init --recursive
#rm -rf keyboard
#rm -rf keyboards
yes | cp -rf ../qmk_firmware/keyboards .
#yes | cp -rf ../qmk_firmware/keyboards .
#mkdir keyboards/ergodox_ez/
cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html
cp ../qmk_firmware/readme.md qmk_readme.md
./generate.sh
#cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html
#cp ../qmk_firmware/readme.md qmk_readme.md
#./generate.sh
rm -f _compiled/*.hex
for file in ../qmk_firmware/keyboards/*/keymaps/*/*.hex; do mv -v "$file" "_compiled/${file##*/}"; done

git add -A
git commit -m "generated from qmk/qmk_firmware@${rev}"
Expand Down

0 comments on commit ec86fac

Please sign in to comment.