Skip to content

Instantly share code, notes, and snippets.

@goog
Created September 25, 2016 09:25
Show Gist options
  • Save goog/58c6b3e63948752e248a408db11a03b6 to your computer and use it in GitHub Desktop.
Save goog/58c6b3e63948752e248a408db11a03b6 to your computer and use it in GitHub Desktop.
keycode map
#include "keymap_common.h"
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: numpad */
KEYMAP( NLCK, SLASH, PAST, PMNS, \
P7, P8, P9, PENT, \
P4, P5, P6, \
P1, P2, P3, \
P0, PDOT, PPLS),
#if 0
KEYMAP_ANSI(
GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, \
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \
CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, \
LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, \
LCTL,LGUI,LALT, SPC, FN0, RGUI,APP, RCTL),
/* 1: colemak */
KEYMAP_ANSI(
GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, \
TAB, Q, W, F, P, G, J, L, U, Y, SCLN,LBRC,RBRC,BSLS, \
BSPC,A, R, S, T, D, H, N, E, I, O, QUOT, ENT, \
LSFT,Z, X, C, V, B, K, M, COMM,DOT, SLSH, RSFT, \
LCTL,LGUI,LALT, SPC, FN0, RGUI,APP, RCTL),
/* 2: dvorak */
KEYMAP_ANSI(
GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, LBRC,RBRC,BSPC, \
TAB, QUOT,COMM,DOT, P, Y, F, G, C, R, L, SLSH,EQL, BSLS, \
CAPS,A, O, E, U, I, D, H, T, N, S, MINS, ENT, \
LSFT,SCLN,Q, J, K, X, B, M, W, V, Z, RSFT, \
LCTL,LGUI,LALT, SPC, FN0, RGUI,APP, RCTL),
/* 4: Poker with Arrow */
KEYMAP_ANSI(
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, \
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, UP, \
TRNS,TRNS,TRNS, TRNS, TRNS,LEFT,DOWN,RGHT),
/* 5: Poker with Esc */
KEYMAP_ANSI(
ESC, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, \
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, \
TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS),
/* 6: Poker Fn
* ,-----------------------------------------------------------.
* |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |
* |-----------------------------------------------------------|
* | |FnQ| Up| | | | | | |Cal| |Hom|Ins|FnL |
* |-----------------------------------------------------------|
* | |Lef|Dow|Rig| | |Psc|Slk|Pau| |Tsk|End| |
* |-----------------------------------------------------------|
* | |Del| |Web|Mut|VoU|VoD| |PgU|PgD|Del| |
* |-----------------------------------------------------------|
* | | | | FnS | | | | |
* `-----------------------------------------------------------'
* Fn: to Fn overlay
* FnL: to Layout selector overaly
* FnQ: toggle Esc overlay
* FnS: toggle Arrow overlay
*/
KEYMAP_ANSI(
ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, \
TRNS,FN2, UP, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,CALC,TRNS,HOME,INS, FN4, \
TRNS,LEFT,DOWN,RGHT,TRNS,TRNS,PSCR,SLCK,PAUS,TRNS,FN3, END, TRNS, \
TRNS,DEL, TRNS,WHOM,MUTE,VOLU,VOLD,TRNS,PGUP,PGDN,DEL, TRNS, \
TRNS,TRNS,TRNS, FN1, TRNS,TRNS,TRNS,TRNS),
/* 7: Layout selector
* ,-----------------------------------------------------------.
* | Lq| Lc| Ld| Lw| | | | | | | | | | |
* |-----------------------------------------------------------|
* | |Lq |Lw | | | | | | | | | | | |
* |-----------------------------------------------------------|
* | | | |Ld | | | | | | | | | |
* |-----------------------------------------------------------|
* | | | |Lc | | | | | | | | |
* |-----------------------------------------------------------|
* | | | | | | | | |
* `-----------------------------------------------------------'
* Lq: set Qwerty layout
* Lc: set Colemak layout
* Ld: set Dvorak layout
* Lw: set Workman layout
*/
KEYMAP_ANSI(
FN5, FN6, FN7, FN8, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
TRNS,FN5, FN8, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
TRNS,TRNS,TRNS,FN7, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, \
TRNS,TRNS,TRNS,FN6, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, \
TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS),
#endif
};
const action_t PROGMEM fn_actions[] = {
/* Poker Layout */
//[0] = ACTION_LAYER_TOGGLE(1),
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment