-
-
Notifications
You must be signed in to change notification settings - Fork 40k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New controller board 'kintwin' for Kinesis Contoured keyboards #21453
Closed
Closed
Changes from 11 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
2e1a71a
New controller board 'kintwin' for Kinesis Contoured keyboards
alvicstep f3f0f92
Update keyboards/kinesis/kintwin/info.json
alvicstep ccc0157
Update keyboards/kinesis/kintwin/readme.md
alvicstep 2401741
Update keyboards/kinesis/kintwin/info.json
alvicstep 745d26f
Update keyboards/kinesis/kintwin/rules.mk
alvicstep 40194b7
Fixed num lock LED in existing keymaps; defined compose LED pin; rena…
alvicstep e02c4dd
Added license headers per code review comments
alvicstep c868735
Deleted rules.mk in kinesis dir per code review discussion. Build opt…
alvicstep 982fda0
Update keyboards/kinesis/keymaps/soft_dev/readme.md
alvicstep 1f715d5
Removed leading white space from license headers
alvicstep 366537d
Defect fix: soft_dev keymap fails with some controllers because they …
alvicstep 39829a2
Update keyboards/kinesis/kintwin/readme.md
alvicstep 8fd88ff
Code review change - defined LED variables in info.json and deleted t…
alvicstep 2a6fca5
Moved kintwin directory from keyboards/kinesis to keyboards directory…
alvicstep File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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,148 @@ | ||
/* Copyright 2023 Alex Stepanov | ||
* | ||
* 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 | ||
|
||
enum layer_names { | ||
_BASE, // default layer | ||
_KEYPAD, // arrow keys, shifted symbols, HOME, END, PGUP, PGDN, FKeys, CTRL(TAB) | ||
_NUMPAD // numpad keys | ||
}; | ||
|
||
/* ,------------------------------------------------------------------------------------------------------------------------. | ||
* | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | | F9 | F10 | F11 | F12 |PSCR|SLCK|PAUS|KPAD|BOOT| | ||
* |--------+------+------+------+-------+------+--------------------------------+------+------+------+------+------+--------| | ||
* | -_ | 1! | 2@ | 3# | 4$ | 5% | | 6^ | 7& | 8* | 9( | 0) | =+ | | ||
* |--------+------+------+------+-------+------| +------+------+------+------+------+--------| | ||
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \| | | ||
* |--------+------+------+------+-------+------| |------+------+------+------+------+--------| | ||
* | Del | A | S | D | F | G | | H | J | K | L | ;: | '" | | ||
* |--------+------+------+------+-------+------| |------+------+------+------+------+--------| | ||
* | Shift | Z | X | C | V | B | | N | M | ,. | .> | /? |Sht/Ent | | ||
* `--------+------+------+------+-------+------- `------+------+------+------+------+--------' | ||
* | `~ | Gui | Esc |MO(Num)| | [{ | ]} | | | | ||
* `----------------------------' `---------------------------' | ||
* ,---------------. ,---------------. | ||
* |Alt+Tab| Alt | | Alt |TO(Num)| | ||
* ,------|------ |-------| |-------+-------+------. | ||
* | | | Shift | | Shift | | | | ||
* | BkSp | KPAD |-------| |------ | KPAD | Space| | ||
* | | | Ctrl | | Ctrl | | | | ||
* `----------------------' `----------------------' | ||
*/ | ||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
[_BASE] = LAYOUT_pretty( | ||
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_SCRL,KC_PAUS,TO(_KEYPAD),QK_BOOT, | ||
KC_MINS,KC_1,KC_2,KC_3,KC_4,KC_5, KC_6,KC_7,KC_8,KC_9,KC_0,KC_EQL, | ||
KC_TAB,KC_Q,KC_W,KC_E,KC_R,KC_T, KC_Y,KC_U,KC_I,KC_O,KC_P,KC_BSLS, | ||
KC_DEL,KC_A,KC_S,KC_D,KC_F,KC_G, KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT, | ||
KC_LSFT,KC_Z,KC_X,KC_C,KC_V,KC_B, KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,SC_SENT, | ||
KC_GRV,KC_LGUI,KC_ESC,MO(_NUMPAD), KC_LBRC,KC_RBRC,KC_NO,KC_NO, | ||
LALT(KC_TAB),KC_LALT, KC_RALT,TO(_NUMPAD), | ||
KC_LSFT, KC_RSFT, | ||
KC_BSPC,MO(_KEYPAD),KC_LCTL, KC_RCTL,MO(_KEYPAD),KC_SPC | ||
), | ||
/* ,------------------------------------------------------------------------------------------------------------------------. | ||
* | | | | | | | | | | | | | | | | | TO(BASE) | | | ||
* |--------+------+------+------+------+------+---------------------------------+------+------+------+------+------+--------| | ||
* | _ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + | | ||
* |--------+------+------+------+------+------| |------+------+------+------+------+--------| | ||
* | | F1 | F2 | F3 | F4 | F5 | | | Home | Up | End | | | | | ||
* |--------+------+------+------+------+------| |------+------+------+------+------+--------| | ||
* | | F6 | F7 | F8 | F9 | F10 | | Pgup | Lft | Dwn | Rgt | : | " | | ||
* |--------+------+------+------+------+------| |------+------+------+------+------+--------| | ||
* | CapsLk | | | | F11 | F12 | | Pgdn | | < | > | ? | | | ||
* `--------+------+------+------+------+------' `------+------+------+------+------+--------' | ||
* | ~ | INS | | | | { | } | | | | ||
* `---------------------------' `---------------------------' | ||
* ,--------------. ,--------------------. | ||
* |Ctl+Tab| | | | | | | ||
* ,------|------ |------| |------+------+------. | ||
* | | |Shift | |Shift | | | | ||
* | | |------| |------| | | | ||
* | | | Ctrl | | Ctrl | | | | ||
* `-------------- ------' `--------------------' | ||
*/ | ||
[_KEYPAD] = LAYOUT_pretty( | ||
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,KC_NO,KC_NO,TO(_BASE),KC_NO, | ||
KC_UNDS,KC_EXLM,KC_AT,KC_HASH,KC_DLR,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_PLUS, | ||
KC_NO,KC_F1,KC_F2,KC_F3,KC_F4,KC_F5, KC_NO,KC_HOME,KC_UP,KC_END,KC_NO,KC_PIPE, | ||
KC_CAPS,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10, KC_PGUP,KC_LEFT,KC_DOWN,KC_RGHT,KC_COLN,KC_DQUO, | ||
KC_NO,KC_NO,KC_NO,KC_NO,KC_F11,KC_F12, KC_PGDN,KC_NO,KC_LT,KC_GT,KC_QUES,KC_NO, | ||
KC_TILD,KC_INS,KC_NO,KC_NO, KC_LCBR,KC_RCBR,KC_NO,KC_NO, | ||
LCTL(KC_TAB),KC_NO, KC_NO,KC_NO, | ||
KC_LSFT, KC_RSFT, | ||
KC_NO,KC_NO,KC_LCTL, KC_RCTL,KC_NO,KC_NO | ||
), | ||
/*,--------+------+------+------+------+------+ +------+------+------+------+------+--------. | ||
* | | | | | | | | | Base | = | / | * | | | ||
* |--------+------+------+------+------+------| |------+------+------+------+------+--------| | ||
* | | | | | | | | | 7 | 8 | 9 | - | | | ||
* |--------+------+------+------+------+------| |------+------+------+------+------+--------| | ||
* | Del | | | | | | | | 4 | 5 | 6 | + | | | ||
* |--------+------+------+------+------+------| |------+------+------+------+------+--------| | ||
* | BkSp | | | | | | | | 1 | 2 | 3 |Enter | Enter | | ||
* `--------+------+------+------+------+------' `------+------+------+------+------+--------' | ||
* | | | | | | . |Enter | | | | ||
* `---------------------------' `---------------------------' | ||
* ,-------------. ,-------------. | ||
* | | | | | Base | | ||
* ,------|------|------| |------+------+------. | ||
* | | | | | | | | | ||
* | BkSp | |------| |------| | 0 | | ||
* | | | | | | | | | ||
* `--------------------' `--------------------' | ||
*/ | ||
|
||
[_NUMPAD] = LAYOUT_pretty( | ||
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,KC_NO,KC_NO,KC_NO,KC_NO, | ||
KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,TO(_BASE),KC_EQL,KC_SLSH,KC_ASTR,KC_NO, | ||
KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_7,KC_8,KC_9,KC_MINS,KC_NO, | ||
KC_DEL,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_4,KC_5,KC_6,KC_PLUS,KC_NO, | ||
KC_BSPC,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_1,KC_2,KC_3,KC_ENT,KC_ENT, | ||
KC_NO,KC_NO,KC_NO,KC_NO, KC_DOT,KC_ENT,KC_NO,KC_NO, | ||
KC_NO,KC_NO, KC_NO,TO(_BASE), | ||
KC_NO, KC_NO, | ||
KC_BSPC,KC_NO,KC_NO, KC_NO,KC_NO,KC_0 | ||
) | ||
}; | ||
|
||
layer_state_t layer_state_set_user(layer_state_t state) { | ||
//set LEDs which are triggered by a layer change | ||
#ifdef LED_COMPOSE_PIN | ||
writePin(LED_COMPOSE_PIN, !layer_state_cmp(state, _KEYPAD)); | ||
#endif | ||
|
||
#ifdef LED_NUM_LOCK_PIN | ||
writePin(LED_NUM_LOCK_PIN, !layer_state_cmp(state, _NUMPAD)); | ||
#endif | ||
|
||
return state; | ||
}; | ||
|
||
bool led_update_user(led_t led_state) { | ||
#ifdef LED_CAPS_LOCK_PIN | ||
writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); | ||
#endif | ||
|
||
#ifdef LED_SCROLL_LOCK_PIN | ||
writePin(LED_SCROLL_LOCK_PIN, !led_state.scroll_lock); | ||
#endif | ||
|
||
//disable default processing of LEDs | ||
return false; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nitpick, so feel free to ignore, but this bothers me.
Specifically, most/all keycodes have a 7 character name/alias, so you can have a 9 wide column (eg
1234567,
), so you can have consistent formatting/placement. So this scrunched together could be better spaced.