forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Keychron K3 ISO keymap (qmk#195)
* Added K3 ISO keymap * Aligned KC_Y and KC_H
- Loading branch information
Gibbio
authored
Jan 13, 2022
1 parent
ffcfac2
commit 0e6d154
Showing
11 changed files
with
331 additions
and
444 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/* USB Device descriptor parameter */ | ||
#define VENDOR_ID 0x3434 | ||
#define PRODUCT_ID 0xFE04 | ||
#define DEVICE_VER 0x0001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
/* | ||
Copyright 2020 Dimitris Mantzouranis | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 2 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#include QMK_KEYBOARD_H | ||
|
||
// Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
// The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
// Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
// entirely and just use numbers. | ||
enum layer_names { | ||
_BASE = 0, | ||
_FN, | ||
}; | ||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
|
||
/* | ||
***************************************************************************************************************** | ||
* ESC * F1 * F2 * F3 * F4 * F5 * F6 * F7 * F8 * F9 * F10 * F11 * F12 * PSCR * DEL * RMOD * | ||
***************************************************************************************************************** | ||
* ~ * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 0 * * * = * BSPC * PGUP * | ||
***************************************************************************************************************** | ||
* TAB * Q * W * E * R * T * Y * U * I * O * P * [ * ] * \ * PGDN * | ||
***************************************************************************************************************** | ||
* CAPS * A * S * D * F * G * H * J * K * L * ; * ' * ENT * HOME * | ||
***************************************************************************************************************** | ||
* LSFT * Z * X * C * V * B * N * M * , * . * / * RSFT * UP * END * | ||
***************************************************************************************************************** | ||
* LCTL * LGUI * LALT * SPC * RALT * FN * RCTL * LEFT * DOWN * RGHT * | ||
***************************************************************************************************************** | ||
*/ | ||
[_BASE] = { | ||
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */ | ||
{ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, RGB_MOD }, | ||
{ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, XXXXXXX, KC_PGUP }, | ||
{ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, XXXXXXX, KC_PGDN }, | ||
{ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, XXXXXXX, KC_HOME }, | ||
{ KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT, KC_UP, KC_END }, | ||
{ KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_RALT, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT } | ||
}, | ||
|
||
/* | ||
***************************************************************************************************************** | ||
* * * * * * RVAD * RVAI * MPRV * MPLY * MNXT * MUTE * VOLD * VOLU * * * RTOG * | ||
***************************************************************************************************************** | ||
* * * * * * * * * * * * * * * RM_P * | ||
***************************************************************************************************************** | ||
* * * * * * * * * * * * * * * * | ||
***************************************************************************************************************** | ||
* * * * * * * * * * * * * * * | ||
***************************************************************************************************************** | ||
* * * * * * * * * * * * * RSAI * * | ||
***************************************************************************************************************** | ||
* * * * * * FN * * RHUD * RSAD * RHUI * | ||
***************************************************************************************************************** | ||
*/ | ||
[_FN] = { | ||
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */ | ||
{ RESET, KC_NO, KC_NO, KC_NO, KC_NO, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, RGB_TOG }, | ||
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, XXXXXXX, RGB_M_P }, | ||
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, XXXXXXX, KC_NO }, | ||
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, XXXXXXX, KC_NO, XXXXXXX, KC_NO }, | ||
{ KC_NO, XXXXXXX, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, XXXXXXX, KC_NO, RGB_SAI, KC_NO }, | ||
{ KC_NO, KC_NO, KC_NO, XXXXXXX, XXXXXXX, XXXXXXX, KC_NO, XXXXXXX, XXXXXXX, XXXXXXX, KC_NO, MO(_FN), KC_NO, RGB_HUD, RGB_SAD, RGB_HUI } | ||
} | ||
}; | ||
|
||
bool dip_switch_update_user(uint8_t index, bool active) { | ||
switch(index) { | ||
case 0: // OS switch | ||
if (active) { // Win/Android mode | ||
// do stuff | ||
} | ||
else { // Mac/iOS mode | ||
// do stuff | ||
} | ||
break; | ||
case 1: // Connection switch | ||
// Probably it's not possible to do anything sensible here as switching from Cable to BT requires turning off the board. (BT / OFF / Cable) | ||
if (active) { // BT mode | ||
// do stuff | ||
} | ||
else { //Cable mode | ||
// do stuff | ||
} | ||
break; | ||
} | ||
return true; | ||
} | ||
|
||
void keyboard_post_init_user(void) { | ||
// Customise these values to desired behaviour | ||
// debug_enable = true; | ||
// debug_matrix = true; | ||
// debug_keyboard = true; | ||
// debug_mouse = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "Keychron K3 ANSI", | ||
"vendorId": "0x3434", | ||
"productId": "0xFE04", | ||
"lighting": "none", | ||
"matrix": {"rows": 6, "cols": 16}, | ||
"layouts": { | ||
"keymap": [ | ||
[ "0,0","0,1","0,2","0,3","0,4","0,5","0,6","0,7","0,8","0,9","0,10","0,11","0,12","0,13","0,14","0,15" ], | ||
[ "1,0","1,1","1,2","1,3","1,4","1,5","1,6","1,7","1,8","1,9","1,10","1,11","1,12",{"w": 2},"1,13","1,15" ], | ||
[{"w": 1.5},"2,0","2,1","2,2","2,3","2,4","2,5","2,6","2,7","2,8","2,9","2,10","2,11","2,12",{"w": 1.5},"2,13","2,15" ], | ||
[{"w": 1.75},"3,0","3,1","3,2","3,3","3,4","3,5","3,6","3,7","3,8","3,9","3,10","3,11",{"w": 2.25},"3,13","3,15" ], | ||
[{"w": 2.25},"4,0","4,2","4,3","4,4","4,5","4,6","4,7","4,8","4,9","4,10","4,11",{"w": 1.75},"4,13","4,14","4,15" ], | ||
[{"w": 1.25},"5,0",{"w": 1.25},"5,1",{"w": 1.25},"5,2",{"w": 6.25},"5,6","5,10","5,11","5,12","5,13","5,14","5,15" ] | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* USB Device descriptor parameter */ | ||
#define VENDOR_ID 0x3434 | ||
#define PRODUCT_ID 0xFE05 | ||
#define DEVICE_VER 0x0001 | ||
|
||
#define KEYMAP_ISO 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
/* | ||
Copyright 2020 Dimitris Mantzouranis | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 2 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#include QMK_KEYBOARD_H | ||
|
||
// Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
// The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
// Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
// entirely and just use numbers. | ||
enum layer_names { | ||
_BASE = 0, | ||
_FN, | ||
}; | ||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
|
||
/* +------------------------------------------------------------------------------+ | ||
| ESC| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10| F11| F12|PSCR|DEL|RMOD| | ||
+------------------------------------------------------------------------------+ | ||
| ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP |PGUP| | ||
+------------------------------------------------------------------------------+ | ||
| TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | |PGDN| | ||
+------------------------------------------------------------------- RET -----+ | ||
|CAPSLCK| A | S | D | F | G | H | J | K | L | ; | ' | # | |HOME| | ||
+------------------------------------------------------------------------------+ | ||
|LSHFT| \ | Z | X | C | V | B | N | M | , | . | / | RSHIFT| UP | END| | ||
+------------------------------------------------------------------------------+ | ||
|LCTRL| LGUI| LALT| SPACE | RALT| FN |RCTL|LEFT|DOWN|RGHT| | ||
+------------------------------------------------------------------------------+ | ||
*/ | ||
[_BASE] = { | ||
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */ | ||
{ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, RGB_MOD }, | ||
{ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO, KC_PGUP }, | ||
{ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_NO, KC_NO, KC_PGDN }, | ||
{ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_NO, KC_HOME }, | ||
{ KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, KC_UP, KC_END }, | ||
{ KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RALT, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT } | ||
}, | ||
/* +------------------------------------------------------------------------------+ | ||
| | | | | |RVAD|RVAI|MPRV|MPLY|MNXT|MUTE|VOLD|VOLU| | |RTOG| | ||
+------------------------------------------------------------------------------+ | ||
| | | | | | | | | | | | | | |RM_P| | ||
+------------------------------------------------------------------------------+ | ||
| | | | | | | | | | | | | | | | | ||
+------------------------------------------------------------------- RET -----+ | ||
| | | | | | | | | | | | | | | | | ||
+------------------------------------------------------------------------------+ | ||
| | | | | | | | | | | | | |RSAI| | | ||
+------------------------------------------------------------------------------+ | ||
| | | | | | FN | |RHUD|RSAD|RHUI| | ||
+------------------------------------------------------------------------------+ | ||
*/ | ||
[_FN] = { | ||
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */ | ||
{ RESET, KC_NO, KC_NO, KC_APP, KC_NO, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, RGB_TOG }, | ||
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, XXXXXXX, RGB_M_P }, | ||
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, XXXXXXX, KC_NO }, | ||
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, XXXXXXX, KC_NO, XXXXXXX, KC_NO }, | ||
{ KC_NO, XXXXXXX, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, XXXXXXX, KC_NO, RGB_SAI, KC_NO }, | ||
{ KC_NO, KC_NO, KC_NO, XXXXXXX, XXXXXXX, XXXXXXX, KC_NO, XXXXXXX, XXXXXXX, XXXXXXX, KC_NO, MO(_FN), KC_NO, RGB_HUD, RGB_SAD, RGB_HUI } | ||
} | ||
}; | ||
|
||
bool dip_switch_update_user(uint8_t index, bool active) { | ||
switch(index) { | ||
case 0: // OS switch | ||
if (active) { // Win/Android mode | ||
// do stuff | ||
} | ||
else { // Mac/iOS mode | ||
// do stuff | ||
} | ||
break; | ||
case 1: // Connection switch | ||
// Probably it's not possible to do anything sensible here as switching from Cable to BT requires turning off the board. (BT / OFF / Cable) | ||
if (active) { // BT mode | ||
// do stuff | ||
} | ||
else { //Cable mode | ||
// do stuff | ||
} | ||
break; | ||
} | ||
return true; | ||
} | ||
|
||
void keyboard_post_init_user(void) { | ||
// Customise these values to desired behaviour | ||
// debug_enable = true; | ||
// debug_matrix = true; | ||
// debug_keyboard = true; | ||
// debug_mouse = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "Keychron K3 ISO", | ||
"vendorId": "0x3434", | ||
"productId": "0xFE05", | ||
"lighting": "none", | ||
"matrix": {"rows": 6, "cols": 16}, | ||
"layouts": { | ||
"keymap": [ | ||
[ "0,0","0,1","0,2","0,3","0,4","0,5","0,6","0,7","0,8","0,9","0,10","0,11","0,12","0,13","0,14","0,15" ], | ||
[ "1,0","1,1","1,2","1,3","1,4","1,5","1,6","1,7","1,8","1,9","1,10","1,11","1,12",{"w": 2},"1,13","1,15" ], | ||
[{"w": 1.5},"2,0","2,1","2,2","2,3","2,4","2,5","2,6","2,7","2,8","2,9","2,10","2,11","2,12",{"x": 0.25,"w": 1.25,"h": 2,"w2": 1.5,"h2": 1,"x2": -0.25},"3,13","2,15" ], | ||
[{"w": 1.75},"3,0","3,1","3,2","3,3","3,4","3,5","3,6","3,7","3,8","3,9","3,10","3,11","3,12",{"x": 1.25},"3,15" ], | ||
[{"w": 1.25},"4,0","4,1","4,2","4,3","4,4","4,5","4,6","4,7","4,8","4,9","4,10","4,11",{"w": 1.75},"4,13","4,14","4,15" ], | ||
[{"w": 1.25},"5,0",{"w": 1.25},"5,1",{"w": 1.25},"5,2",{"w": 6.25},"5,6","5,10","5,11","5,12","5,13","5,14","5,15" ] | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.