diff options
| author | tmk <nobody@nowhere> | 2012-12-27 16:06:13 +0900 |
|---|---|---|
| committer | tmk <nobody@nowhere> | 2012-12-27 16:06:13 +0900 |
| commit | 67c64db1ccbc91393a4535636333ea55396c184d (patch) | |
| tree | 6f7e223573d47c395d7d5c487e3007fa281eb4c8 /keyboard/gh60 | |
| parent | c009f4643c17084b8f632b3292e0c7962b324ae5 (diff) | |
| download | qmk_firmware-67c64db1ccbc91393a4535636333ea55396c184d.tar.gz qmk_firmware-67c64db1ccbc91393a4535636333ea55396c184d.zip | |
Add README and keymap layers.(GH60)
Diffstat (limited to 'keyboard/gh60')
| -rw-r--r-- | keyboard/gh60/Makefile.lufa | 5 | ||||
| -rw-r--r-- | keyboard/gh60/Makefile.pjrc | 5 | ||||
| -rw-r--r-- | keyboard/gh60/README.md | 89 | ||||
| -rw-r--r-- | keyboard/gh60/keymap.c | 147 | ||||
| -rw-r--r-- | keyboard/gh60/matrix.c | 32 |
5 files changed, 194 insertions, 84 deletions
diff --git a/keyboard/gh60/Makefile.lufa b/keyboard/gh60/Makefile.lufa index 0977b33f3..45402bb38 100644 --- a/keyboard/gh60/Makefile.lufa +++ b/keyboard/gh60/Makefile.lufa | |||
| @@ -97,7 +97,7 @@ F_USB = $(F_CPU) | |||
| 97 | # Build Options | 97 | # Build Options |
| 98 | # comment out to disable the options. | 98 | # comment out to disable the options. |
| 99 | # | 99 | # |
| 100 | #MOUSEKEY_ENABLE = yes # Mouse keys | 100 | MOUSEKEY_ENABLE = yes # Mouse keys |
| 101 | EXTRAKEY_ENABLE = yes # Audio control and System control | 101 | EXTRAKEY_ENABLE = yes # Audio control and System control |
| 102 | CONSOLE_ENABLE = yes # Console for debug | 102 | CONSOLE_ENABLE = yes # Console for debug |
| 103 | #NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA | 103 | #NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA |
| @@ -118,3 +118,6 @@ VPATH += $(TOP_DIR) | |||
| 118 | include $(TOP_DIR)/protocol/lufa.mk | 118 | include $(TOP_DIR)/protocol/lufa.mk |
| 119 | include $(TOP_DIR)/common.mk | 119 | include $(TOP_DIR)/common.mk |
| 120 | include $(TOP_DIR)/rules.mk | 120 | include $(TOP_DIR)/rules.mk |
| 121 | |||
| 122 | plain: OPT_DEFS += -DPLAIN_MAP | ||
| 123 | plain: all | ||
diff --git a/keyboard/gh60/Makefile.pjrc b/keyboard/gh60/Makefile.pjrc index dc5b2f743..6b3a8d1ac 100644 --- a/keyboard/gh60/Makefile.pjrc +++ b/keyboard/gh60/Makefile.pjrc | |||
| @@ -74,7 +74,7 @@ F_CPU = 16000000 | |||
| 74 | # Build Options | 74 | # Build Options |
| 75 | # comment out to disable the options. | 75 | # comment out to disable the options. |
| 76 | # | 76 | # |
| 77 | #MOUSEKEY_ENABLE = yes # Mouse keys | 77 | MOUSEKEY_ENABLE = yes # Mouse keys |
| 78 | #PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support | 78 | #PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support |
| 79 | EXTRAKEY_ENABLE = yes # Audio control and System control | 79 | EXTRAKEY_ENABLE = yes # Audio control and System control |
| 80 | NKRO_ENABLE = yes # USB Nkey Rollover | 80 | NKRO_ENABLE = yes # USB Nkey Rollover |
| @@ -88,3 +88,6 @@ VPATH += $(TOP_DIR) | |||
| 88 | include $(TOP_DIR)/protocol/pjrc.mk | 88 | include $(TOP_DIR)/protocol/pjrc.mk |
| 89 | include $(TOP_DIR)/common.mk | 89 | include $(TOP_DIR)/common.mk |
| 90 | include $(TOP_DIR)/rules.mk | 90 | include $(TOP_DIR)/rules.mk |
| 91 | |||
| 92 | plain: OPT_DEFS += -DPLAIN_MAP | ||
| 93 | plain: all | ||
diff --git a/keyboard/gh60/README.md b/keyboard/gh60/README.md new file mode 100644 index 000000000..73eb4b6d5 --- /dev/null +++ b/keyboard/gh60/README.md | |||
| @@ -0,0 +1,89 @@ | |||
| 1 | GH60 keyboard firmware | ||
| 2 | ====================== | ||
| 3 | DIY compact keyboard designed and run by komar007 and Geekhack community. | ||
| 4 | |||
| 5 | ## Threads on Geekhack.org | ||
| 6 | - [Prototyping](http://geekhack.org/index.php?topic=34959.0) | ||
| 7 | - [Beta-test](http://geekhack.org/index.php?topic=37570.0) | ||
| 8 | |||
| 9 | |||
| 10 | ## Build | ||
| 11 | Move to this directory then just run `make` like: | ||
| 12 | |||
| 13 | $ make -f Makfile.pjrc | ||
| 14 | |||
| 15 | |||
| 16 | ## Keymap | ||
| 17 | See keymap.c to define your own favourite keymap. | ||
| 18 | |||
| 19 | ###Keymap with funky layers. | ||
| 20 | Layer 0: Default Layer | ||
| 21 | ,-----------------------------------------------------------. | ||
| 22 | |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | | ||
| 23 | |-----------------------------------------------------------| | ||
| 24 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | ||
| 25 | |-----------------------------------------------------------| | ||
| 26 | |Caps | A| S| D| F| G| H| J| K| L|Fn3| '|Return | | ||
| 27 | |-----------------------------------------------------------| | ||
| 28 | |Shift | Z| X| C| V| B| N| M| ,| .|Fn2|Shift | | ||
| 29 | |-----------------------------------------------------------| | ||
| 30 | |Ctrl|Gui |Alt | Space |Alt |Gui |App |Fn1 | | ||
| 31 | `-----------------------------------------------------------' | ||
| 32 | |||
| 33 | Layer 1: HHKB mode | ||
| 34 | ,-----------------------------------------------------------. | ||
| 35 | |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete | | ||
| 36 | |-----------------------------------------------------------| | ||
| 37 | |Caps | | | | | | | |Psc|Slk|Pus|Up | |Inser| | ||
| 38 | |-----------------------------------------------------------| | ||
| 39 | |Contro|VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig|Enter | | ||
| 40 | |-----------------------------------------------------------| | ||
| 41 | |Shift | | | | | | +| -|End|PgD|Dow|Shift | | ||
| 42 | |-----------------------------------------------------------| | ||
| 43 | |Ctrl|Gui |Alt | Space |Alt |Gui |App |xxx | | ||
| 44 | `-----------------------------------------------------------' | ||
| 45 | |||
| 46 | Layer 2: Vi mode | ||
| 47 | ,-----------------------------------------------------------. | ||
| 48 | | `| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Backsp | | ||
| 49 | |-----------------------------------------------------------| | ||
| 50 | |Tab |Hom|PgD|Up |PgU|End|Hom|PgD|PgU|End| | | | | | ||
| 51 | |-----------------------------------------------------------| | ||
| 52 | |Contro| |Lef|Dow|Rig| |Lef|Dow|Up |Rig| | |Return | | ||
| 53 | |-----------------------------------------------------------| | ||
| 54 | |Shift | | | | | |Hom|PgD|PgU|End|xxx|Shift | | ||
| 55 | |-----------------------------------------------------------| | ||
| 56 | |Ctrl|Gui |Alt | Space |Alt |Gui |App |Ctrl| | ||
| 57 | `-----------------------------------------------------------' | ||
| 58 | |||
| 59 | Layer 3: Mouse mode | ||
| 60 | ,-----------------------------------------------------------. | ||
| 61 | | `| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Backsp | | ||
| 62 | |-----------------------------------------------------------| | ||
| 63 | |Tab |MwL|MwD|McU|MwU|MwR|MwL|MwD|MwU|MwR| | | | | | ||
| 64 | |-----------------------------------------------------------| | ||
| 65 | |Contro| |McL|McD|McR| |McL|McD|McU|McR|xxx| |Return | | ||
| 66 | |-----------------------------------------------------------| | ||
| 67 | |Shift | | |Mb1|Mb2|Mb3|Mb2|Mb1| | | |Shift | | ||
| 68 | |-----------------------------------------------------------| | ||
| 69 | |Ctrl|Gui |Alt | Space |Alt |Gui |xxx |Ctrl| | ||
| 70 | `-----------------------------------------------------------' | ||
| 71 | Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel | ||
| 72 | |||
| 73 | ### Plain keymap without Fn layer. | ||
| 74 | This will be useful if you want to use key mapping tool like AHK. | ||
| 75 | To get this plain keymap run: | ||
| 76 | |||
| 77 | $ make -f Makefile.pjrc plain | ||
| 78 | |||
| 79 | ,-----------------------------------------------------------. | ||
| 80 | |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | | ||
| 81 | |-----------------------------------------------------------| | ||
| 82 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | ||
| 83 | |-----------------------------------------------------------| | ||
| 84 | |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | | ||
| 85 | |-----------------------------------------------------------| | ||
| 86 | |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | ||
| 87 | |-----------------------------------------------------------| | ||
| 88 | |Ctrl|Gui |Alt | Space |Alt |Gui |App |Ctrl| | ||
| 89 | `-----------------------------------------------------------' | ||
diff --git a/keyboard/gh60/keymap.c b/keyboard/gh60/keymap.c index 7ccae1a81..6a01d37c1 100644 --- a/keyboard/gh60/keymap.c +++ b/keyboard/gh60/keymap.c | |||
| @@ -24,6 +24,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 24 | #include "keymap.h" | 24 | #include "keymap.h" |
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | /* GH60 keymap definition macro | ||
| 28 | * K2C, K31 and K3C are extra keys for ISO | ||
| 29 | */ | ||
| 27 | #define KEYMAP( \ | 30 | #define KEYMAP( \ |
| 28 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ | 31 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ |
| 29 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ | 32 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ |
| @@ -38,6 +41,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 38 | { KC_##K40, KC_##K41, KC_##K42, KC_NO, KC_NO, KC_##K45, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D } \ | 41 | { KC_##K40, KC_##K41, KC_##K42, KC_NO, KC_NO, KC_##K45, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D } \ |
| 39 | } | 42 | } |
| 40 | 43 | ||
| 44 | /* ANSI valiant. No extra keys for ISO */ | ||
| 45 | #define KEYMAP_ANSI( \ | ||
| 46 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ | ||
| 47 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ | ||
| 48 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ | ||
| 49 | K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ | ||
| 50 | K40, K41, K42, K45, K4A, K4B, K4C, K4D \ | ||
| 51 | ) KEYMAP( \ | ||
| 52 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ | ||
| 53 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ | ||
| 54 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO, K2D, \ | ||
| 55 | K30, NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, NO, K3D, \ | ||
| 56 | K40, K41, K42, K45, K4A, K4B, K4C, K4D \ | ||
| 57 | ) | ||
| 58 | |||
| 41 | #define KEYCODE(layer, row, col) (pgm_read_byte(&keymaps[(layer)][(row)][(col)])) | 59 | #define KEYCODE(layer, row, col) (pgm_read_byte(&keymaps[(layer)][(row)][(col)])) |
| 42 | 60 | ||
| 43 | 61 | ||
| @@ -47,10 +65,10 @@ static const uint8_t PROGMEM fn_layer[] = { | |||
| 47 | 1, // Fn1 | 65 | 1, // Fn1 |
| 48 | 2, // Fn2 | 66 | 2, // Fn2 |
| 49 | 3, // Fn3 | 67 | 3, // Fn3 |
| 50 | 4, // Fn4 | 68 | 3, // Fn4 |
| 51 | 0, // Fn5 | 69 | 0, // Fn5 |
| 52 | 3, // Fn6 | 70 | 0, // Fn6 |
| 53 | 3 // Fn7 | 71 | 0 // Fn7 |
| 54 | }; | 72 | }; |
| 55 | 73 | ||
| 56 | // Assign Fn key(0-7) to a keycode sent when release Fn key without use of the layer. | 74 | // Assign Fn key(0-7) to a keycode sent when release Fn key without use of the layer. |
| @@ -60,13 +78,14 @@ static const uint8_t PROGMEM fn_keycode[] = { | |||
| 60 | KC_NO, // Fn1 | 78 | KC_NO, // Fn1 |
| 61 | KC_SLSH, // Fn2 | 79 | KC_SLSH, // Fn2 |
| 62 | KC_SCLN, // Fn3 | 80 | KC_SCLN, // Fn3 |
| 63 | KC_SPC, // Fn4 | 81 | KC_NO, // Fn4 |
| 64 | KC_NO, // Fn5 | 82 | KC_NO, // Fn5 |
| 65 | KC_NO, // Fn6 | 83 | KC_NO, // Fn6 |
| 66 | KC_NO // Fn7 | 84 | KC_NO // Fn7 |
| 67 | }; | 85 | }; |
| 68 | 86 | ||
| 69 | static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 87 | static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 88 | #ifdef PLAIN_MAP | ||
| 70 | /* Layer 0: Default Layer | 89 | /* Layer 0: Default Layer |
| 71 | * ,-----------------------------------------------------------. | 90 | * ,-----------------------------------------------------------. |
| 72 | * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | | 91 | * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |
| @@ -75,7 +94,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 75 | * |-----------------------------------------------------------| | 94 | * |-----------------------------------------------------------| |
| 76 | * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | | 95 | * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | |
| 77 | * |-----------------------------------------------------------| | 96 | * |-----------------------------------------------------------| |
| 78 | * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift | | 97 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | |
| 79 | * |-----------------------------------------------------------| | 98 | * |-----------------------------------------------------------| |
| 80 | * |Ctrl|Gui |Alt | Space |Alt |Gui |App |Ctrl| | 99 | * |Ctrl|Gui |Alt | Space |Alt |Gui |App |Ctrl| |
| 81 | * `-----------------------------------------------------------' | 100 | * `-----------------------------------------------------------' |
| @@ -84,89 +103,85 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 84 | TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ | 103 | TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ |
| 85 | CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,NO, ENT, \ | 104 | CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,NO, ENT, \ |
| 86 | LSFT,NO, Z, X, C, V, B, N, M, COMM,DOT, SLSH,NO, RSFT, \ | 105 | LSFT,NO, Z, X, C, V, B, N, M, COMM,DOT, SLSH,NO, RSFT, \ |
| 87 | LCTL,LGUI,LALT, SPC, RALT,GRV, FN6, RCTL), | 106 | LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL), |
| 88 | 107 | #else | |
| 89 | 108 | /* Layer 0: Default Layer | |
| 90 | #if 0 | ||
| 91 | /* Layer 1: HHKB mode (HHKB Fn) | ||
| 92 | * ,-----------------------------------------------------------. | 109 | * ,-----------------------------------------------------------. |
| 93 | * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete | | 110 | * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |
| 94 | * |-----------------------------------------------------------| | 111 | * |-----------------------------------------------------------| |
| 95 | * |Caps | | | | | | | |Psc|Slk|Pus|Up | | | | 112 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |
| 96 | * |-----------------------------------------------------' | | 113 | * |-----------------------------------------------------------| |
| 97 | * |Contro|VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig|Enter | | 114 | * |Caps | A| S| D| F| G| H| J| K| L|Fn3| '|Return | |
| 98 | * |-----------------------------------------------------------| | 115 | * |-----------------------------------------------------------| |
| 99 | * |Shift | | | | | | +| -|End|PgD|Dow|Shift |xxx| | 116 | * |Shift | Z| X| C| V| B| N| M| ,| .|Fn2|Shift | |
| 100 | * |-----------------------------------------------------------| | 117 | * |-----------------------------------------------------------| |
| 101 | * | |Gui |Alt | |Alt |Gui| | |Ctr| | 118 | * |Ctrl|Gui |Alt | Space |Alt |Gui |Fn4 |Fn1 | |
| 102 | * `-----------------------------------------------------------' | 119 | * `-----------------------------------------------------------' |
| 103 | */ | 120 | */ |
| 104 | KEYMAP(PWR, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, DEL, \ | 121 | KEYMAP_ANSI( |
| 105 | CAPS,NO, NO, NO, NO, NO, NO, NO, PSCR,SLCK,BRK, UP, INS, NLCK,\ | 122 | ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, \ |
| 106 | LCTL,VOLD,VOLU,MUTE,NO, NO, PAST,PSLS,HOME,PGUP,LEFT,RGHT,ENT, \ | 123 | TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ |
| 107 | LSFT,NO, NO, NO, NO, NO, PPLS,PMNS,END, PGDN,DOWN,RSFT,FN1, \ | 124 | LCTL,A, S, D, F, G, H, J, K, L, FN3, QUOT, ENT, \ |
| 108 | NO, LGUI,LALT,SPC, RALT,NO, NO, NO, RCTL), | 125 | LSFT,Z, X, C, V, B, N, M, COMM,DOT, FN2, RSFT, \ |
| 109 | 126 | LCTL,LGUI,LALT, SPC, RALT,RGUI,FN4, FN1), | |
| 110 | 127 | /* Layer 1: HHKB mode | |
| 111 | /* Layer 2: Vi mode (Quote/Rmeta) | ||
| 112 | * ,-----------------------------------------------------------. | 128 | * ,-----------------------------------------------------------. |
| 113 | * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| ` | | 129 | * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete | |
| 114 | * |-----------------------------------------------------------| | 130 | * |-----------------------------------------------------------| |
| 115 | * | \ |Hom|PgD|Up |PgU|End|Hom|PgD|PgU|End| | | | | | 131 | * |Caps | | | | | | | |Psc|Slk|Pus|Up | |Inser| |
| 116 | * |-----------------------------------------------------' | | 132 | * |-----------------------------------------------------------| |
| 117 | * |Contro| |Lef|Dow|Rig| |Lef|Dow|Up |Rig| | | \ | | 133 | * |Contro|VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig|Enter | |
| 118 | * |-----------------------------------------------------------| | 134 | * |-----------------------------------------------------------| |
| 119 | * |Shift | | | | | |Hom|PgD|PgU|End|xxx|Shift | | | 135 | * |Shift | | | | | | +| -|End|PgD|Dow|Shift | |
| 120 | * |-----------------------------------------------------------| | 136 | * |-----------------------------------------------------------| |
| 121 | * | |Gui |Alt |Space |Alt |Gui|Fn6|Fn6|Ctr| | 137 | * |Ctrl|Gui |Alt | Space |Alt |Gui |App |xxx | |
| 122 | * `-----------------------------------------------------------' | 138 | * `-----------------------------------------------------------' |
| 123 | */ | 139 | */ |
| 124 | KEYMAP(GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, GRV, \ | 140 | KEYMAP_ANSI( |
| 125 | BSLS,HOME,PGDN,UP, PGUP,END, HOME,PGDN,PGUP,END, NO, NO, NO, NO, \ | 141 | PWR, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, DEL, \ |
| 126 | LCTL,NO, LEFT,DOWN,RGHT,NO, LEFT,DOWN,UP, RGHT,NO, NO, BSLS, \ | 142 | CAPS,NO, NO, NO, NO, NO, NO, NO, PSCR,SLCK,PAUS,UP, NO, INS, \ |
| 127 | LSFT,NO, NO, NO, NO, NO, HOME,PGDN,PGUP,END, FN2, RSFT,NO, \ | 143 | LCTL,VOLD,VOLU,MUTE,NO, NO, PAST,PSLS,HOME,PGUP,LEFT,RGHT, ENT, \ |
| 128 | NO, LGUI,LALT,SPC, RALT,RGUI,FN6, FN6, RCTL), | 144 | LSFT,NO, NO, NO, NO, NO, PPLS,PMNS,END, PGDN,DOWN, RSFT, \ |
| 129 | 145 | LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, FN1), | |
| 130 | 146 | /* Layer 2: Vi mode (Slash) | |
| 131 | /* Layer 3: Mouse mode (Semicolon) | ||
| 132 | * ,-----------------------------------------------------------. | 147 | * ,-----------------------------------------------------------. |
| 133 | * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| ` | | 148 | * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Backsp | |
| 134 | * |-----------------------------------------------------------| | 149 | * |-----------------------------------------------------------| |
| 135 | * | \ |MwL|MwD|McU|MwU|MwR|MwL|MwD|MwU|MwR| | | | | | 150 | * |Tab |Hom|PgD|Up |PgU|End|Hom|PgD|PgU|End| | | | | |
| 136 | * |-----------------------------------------------------' | | ||
| 137 | * |Contro| |McL|McD|McR| |McL|McD|McU|McR|xxx| | \ | | ||
| 138 | * |-----------------------------------------------------------| | 151 | * |-----------------------------------------------------------| |
| 139 | * |Shift | | |Mb1|Mb2|Mb3|Mb2|Mb1| | | |Shift | | | 152 | * |Contro| |Lef|Dow|Rig| |Lef|Dow|Up |Rig| | |Return | |
| 140 | * |-----------------------------------------------------------| | 153 | * |-----------------------------------------------------------| |
| 141 | * |xxx|Gui |Alt |Mb1 |Alt | | | | | | 154 | * |Shift | | | | | |Hom|PgD|PgU|End|xxx|Shift | |
| 155 | * |-----------------------------------------------------------| | ||
| 156 | * |Ctrl|Gui |Alt | Space |Alt |Gui |App |Ctrl| | ||
| 142 | * `-----------------------------------------------------------' | 157 | * `-----------------------------------------------------------' |
| 143 | * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel | ||
| 144 | */ | 158 | */ |
| 145 | KEYMAP(GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, GRV, \ | 159 | KEYMAP_ANSI( |
| 146 | BSLS,WH_L,WH_D,MS_U,WH_U,WH_R,WH_L,WH_D,WH_U,WH_R,NO, NO, NO, NO, \ | 160 | GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, BSPC, \ |
| 147 | LCTL,NO, MS_L,MS_D,MS_R,NO, MS_L,MS_D,MS_U,MS_R,FN3, NO, BSLS, \ | 161 | TAB, HOME,PGDN,UP, PGUP,END, HOME,PGDN,PGUP,END, NO, NO, NO, NO, \ |
| 148 | LSFT,NO, NO, BTN1,BTN2,BTN3,BTN2,BTN1,NO, NO, NO, RSFT,NO, \ | 162 | LCTL,NO, LEFT,DOWN,RGHT,NO, LEFT,DOWN,UP, RGHT,NO, NO, ENT, \ |
| 149 | FN7, LGUI,LALT,BTN1,RALT,NO, FN6, FN6, NO), | 163 | LSFT,NO, NO, NO, NO, NO, HOME,PGDN,PGUP,END, FN2, RSFT, \ |
| 150 | 164 | LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL), | |
| 151 | 165 | /* Layer 3: Mouse mode (Semicolon/App) | |
| 152 | /* Layer 4: Matias half keyboard style (Space) | ||
| 153 | * ,-----------------------------------------------------------. | 166 | * ,-----------------------------------------------------------. |
| 154 | * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete | | 167 | * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Backsp | |
| 155 | * |-----------------------------------------------------------| | 168 | * |-----------------------------------------------------------| |
| 156 | * |Backs| P| O| I| U| Y| T| R| E| W| Q|Tab|Tab| | | 169 | * |Tab |MwL|MwD|McU|MwU|MwR|MwL|MwD|MwU|MwR| | | | | |
| 157 | * |-----------------------------------------------------' | | ||
| 158 | * |Contro| ;| L| K| J| H| G| F| D| S| A|Con|Control | | ||
| 159 | * |-----------------------------------------------------------| | 170 | * |-----------------------------------------------------------| |
| 160 | * |Shift | /| .| ,| M| N| B| V| C| X| Z|Shift | | | 171 | * |Contro| |McL|McD|McR| |McL|McD|McU|McR|xxx| |Return | |
| 161 | * |-----------------------------------------------------------| | 172 | * |-----------------------------------------------------------| |
| 162 | * | |Gui |Alt |xxxxxxxxxxxxxxxxxxxxxx|Alt |Gui| | |Ctr| | 173 | * |Shift | | |Mb1|Mb2|Mb3|Mb2|Mb1| | | |Shift | |
| 174 | * |-----------------------------------------------------------| | ||
| 175 | * |Ctrl|Gui |Alt | Space |Alt |Gui |xxx |Ctrl| | ||
| 163 | * `-----------------------------------------------------------' | 176 | * `-----------------------------------------------------------' |
| 177 | * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel | ||
| 164 | */ | 178 | */ |
| 165 | KEYMAP(MINS,0, 9, 8, 7, 6, 5, 4, 3, 2, 1, NO, NO, ESC, \ | 179 | KEYMAP_ANSI( |
| 166 | BSPC,P, O, I, U, Y, T, R, E, W, Q, TAB, TAB, TAB, \ | 180 | GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, BSPC, \ |
| 167 | LCTL,SCLN,L, K, J, H, G, F, D, S, A, RCTL,RCTL, \ | 181 | TAB, WH_L,WH_D,MS_U,WH_U,WH_R,WH_L,WH_D,WH_U,WH_R,NO, NO, NO, NO, \ |
| 168 | LSFT,SLSH,DOT, COMM,M, N, B, V, C, X, Z, RSFT,NO, \ | 182 | LCTL,NO, MS_L,MS_D,MS_R,NO, MS_L,MS_D,MS_U,MS_R,FN3, NO, ENT, \ |
| 169 | NO, LGUI,LALT,FN4, RALT,RGUI,NO, NO, RCTL), | 183 | LSFT,NO, BTN1,BTN2,BTN3,BTN2,BTN1,NO, NO, NO, NO, RSFT, \ |
| 184 | LCTL,LGUI,LALT, BTN1, RALT,RGUI,FN4, RCTL), | ||
| 170 | #endif | 185 | #endif |
| 171 | }; | 186 | }; |
| 172 | 187 | ||
diff --git a/keyboard/gh60/matrix.c b/keyboard/gh60/matrix.c index 4c18a6191..1a774e17e 100644 --- a/keyboard/gh60/matrix.c +++ b/keyboard/gh60/matrix.c | |||
| @@ -82,7 +82,7 @@ uint8_t matrix_scan(void) | |||
| 82 | unselect_rows(); | 82 | unselect_rows(); |
| 83 | select_row(i); | 83 | select_row(i); |
| 84 | _delay_us(1); // without this wait read unstable value. | 84 | _delay_us(1); // without this wait read unstable value. |
| 85 | uint16_t cols = ~read_cols(); | 85 | uint16_t cols = read_cols(); |
| 86 | if (matrix[i] != cols) { | 86 | if (matrix[i] != cols) { |
| 87 | matrix[i] = cols; | 87 | matrix[i] = cols; |
| 88 | if (debouncing) { | 88 | if (debouncing) { |
| @@ -132,7 +132,7 @@ uint16_t matrix_get_row(uint8_t row) | |||
| 132 | 132 | ||
| 133 | void matrix_print(void) | 133 | void matrix_print(void) |
| 134 | { | 134 | { |
| 135 | print("\nr/c 01234567\n"); | 135 | print("\nr/c 01234567890ABCDEF\n"); |
| 136 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | 136 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) { |
| 137 | phex(row); print(": "); | 137 | phex(row); print(": "); |
| 138 | pbin_reverse16(matrix_get_row(row)); | 138 | pbin_reverse16(matrix_get_row(row)); |
| @@ -170,20 +170,20 @@ static void init_cols(void) | |||
| 170 | 170 | ||
| 171 | static uint16_t read_cols(void) | 171 | static uint16_t read_cols(void) |
| 172 | { | 172 | { |
| 173 | return (PINF&(1<<0) ? (1<<0) : 0) | | 173 | return (PINF&(1<<0) ? 0 : (1<<0)) | |
| 174 | (PINF&(1<<1) ? (1<<1) : 0) | | 174 | (PINF&(1<<1) ? 0 : (1<<1)) | |
| 175 | (PINE&(1<<6) ? (1<<2) : 0) | | 175 | (PINE&(1<<6) ? 0 : (1<<2)) | |
| 176 | (PINC&(1<<7) ? (1<<3) : 0) | | 176 | (PINC&(1<<7) ? 0 : (1<<3)) | |
| 177 | (PINC&(1<<6) ? (1<<4) : 0) | | 177 | (PINC&(1<<6) ? 0 : (1<<4)) | |
| 178 | (PINB&(1<<6) ? (1<<5) : 0) | | 178 | (PINB&(1<<6) ? 0 : (1<<5)) | |
| 179 | (PIND&(1<<4) ? (1<<6) : 0) | | 179 | (PIND&(1<<4) ? 0 : (1<<6)) | |
| 180 | (PINB&(1<<1) ? (1<<7) : 0) | | 180 | (PINB&(1<<1) ? 0 : (1<<7)) | |
| 181 | (PINB&(1<<0) ? (1<<8) : 0) | | 181 | (PINB&(1<<0) ? 0 : (1<<8)) | |
| 182 | (PINB&(1<<5) ? (1<<9) : 0) | | 182 | (PINB&(1<<5) ? 0 : (1<<9)) | |
| 183 | (PINB&(1<<4) ? (1<<10) : 0) | | 183 | (PINB&(1<<4) ? 0 : (1<<10)) | |
| 184 | (PIND&(1<<7) ? (1<<11) : 0) | | 184 | (PIND&(1<<7) ? 0 : (1<<11)) | |
| 185 | (PIND&(1<<6) ? (1<<12) : 0) | | 185 | (PIND&(1<<6) ? 0 : (1<<12)) | |
| 186 | (PINB&(1<<3) ? (1<<13) : 0); | 186 | (PINB&(1<<3) ? 0 : (1<<13)); |
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | /* Row pin configuration | 189 | /* Row pin configuration |
