ergodox-firmware/firmware/keyboard/ergodox/layout/qwerty-kinesis-mod.c

171 lines
7.7 KiB
C

/* ----------------------------------------------------------------------------
* Copyright (c) 2013 Ben Blazak <benblazak.dev@gmail.com>
* Released under The MIT License (see "doc/licenses/MIT.md")
* Project located at <https://github.com/benblazak/ergodox-firmware>
* ------------------------------------------------------------------------- */
/** description
* A QWERTY layout adapted from the default Kinesis layout. The position of
* the symbol keys on the function layer was taken from the Arensito layout.
*
* Implements the "layout" section of '.../firmware/keyboard.h'
*
* TODO: put a note about where to look for more information if people are
* trying to make their own layout
*/
#include "./common/definitions.h"
// ----------------------------------------------------------------------------
// matrix control
// ----------------------------------------------------------------------------
#include "./default/exec_key.c.h"
// ----------------------------------------------------------------------------
// LED control
// ----------------------------------------------------------------------------
void kb__led__logical_on(char led) {
switch(led) {
case 'N': kb__led__on(1); break; // numlock
case 'C': kb__led__on(2); break; // capslock
case 'S': kb__led__on(3); break; // scroll lock
case 'O': break; // compose
case 'K': break; // kana
};
}
void kb__led__logical_off(char led) {
switch(led) {
case 'N': kb__led__off(1); break; // numlock
case 'C': kb__led__off(2); break; // capslock
case 'S': kb__led__off(3); break; // scroll lock
case 'O': break; // compose
case 'K': break; // kana
};
}
// ----------------------------------------------------------------------------
// keys
// ----------------------------------------------------------------------------
#include "./common/keys.c.h"
KEYS__LAYER__NUM_PUSH(10, 3);
KEYS__LAYER__NUM_POP(10);
// ----------------------------------------------------------------------------
// layout
// ----------------------------------------------------------------------------
#include "./common/matrix.h"
layout_t layout = {
// ............................................................................
MATRIX_LAYER( // layer 0 : default
// macro, unused,
K, nop,
// left hand ...... ......... ......... ......... ......... ......... .........
equal, 1, 2, 3, 4, 5, esc,
bkslash, q, w, e, r, t, lpu1l1,
tab, a, s, d, f, g,
sh2KCapL, z, x, c, v, b, lpupo1l1,
guiL, grave, bkslash, arrowL, arrowR,
ctrlL, altL,
nop, nop, home,
bs, del, end,
// right hand ..... ......... ......... ......... ......... ......... .........
numPush, 6, 7, 8, 9, 0, dash,
brktL, y, u, i, o, p, brktR,
h, j, k, l, semicol, quote,
lpupo1l1, n, m, comma, period, slash, sh2KCapR,
arrowL, arrowD, arrowU, arrowR, guiR,
altR, ctrlR,
pageU, nop, nop,
pageD, enter, space ),
// ............................................................................
MATRIX_LAYER( // layer 1 : function and symbol keys
// macro, unused,
K, nop,
// left hand ...... ......... ......... ......... ......... ......... .........
nop, F1, F2, F3, F4, F5, F11,
transp, braceL, braceR, brktL, brktR, nop, lpo1l1,
transp, semicol, slash, dash, kp0, colon,
transp, kp6, kp7, kp8, kp9, plus, lpupo2l2,
transp, transp, transp, transp, transp,
transp, transp,
transp, transp, transp,
transp, transp, transp,
// right hand ..... ......... ......... ......... ......... ......... .........
F12, F6, F7, F8, F9, F10, power,
transp, nop, undersc, lessThan, grtrThan, dollar, volumeU,
bkslash, kp1, parenL, parenR, equal, volumeD,
lpupo2l2, asterisk, kp2, kp3, kp4, kp5, mute,
transp, transp, transp, transp, transp,
transp, transp,
transp, transp, transp,
transp, transp, transp ),
// ............................................................................
MATRIX_LAYER( // layer 2 : keyboard functions
// macro, unused,
K, nop,
// left hand ...... ......... ......... ......... ......... ......... .........
btldr, nop, nop, nop, nop, nop, nop,
nop, nop, nop, nop, nop, nop, nop,
nop, nop, nop, nop, nop, nop,
nop, nop, nop, nop, nop, nop, nop,
nop, nop, nop, nop, nop,
nop, nop,
nop, nop, nop,
nop, nop, nop,
// right hand ..... ......... ......... ......... ......... ......... .........
nop, nop, nop, nop, nop, nop, nop,
nop, nop, nop, nop, nop, nop, nop,
nop, nop, nop, nop, nop, nop,
nop, nop, nop, nop, nop, nop, nop,
nop, nop, nop, nop, nop,
nop, nop,
nop, nop, nop,
nop, nop, nop ),
// ............................................................................
MATRIX_LAYER( // layer 3 : numpad
// macro, unused,
K, nop,
// left hand ...... ......... ......... ......... ......... ......... .........
transp, transp, transp, transp, transp, transp, transp,
transp, transp, transp, transp, transp, transp, transp,
transp, transp, transp, transp, transp, transp,
transp, transp, transp, transp, transp, transp, transp,
transp, ins, transp, transp, transp,
transp, transp,
transp, transp, transp,
transp, transp, transp,
// right hand ..... ......... ......... ......... ......... ......... .........
numPop, transp, numPop, equal, kpDiv, kpMul, transp,
transp, transp, kp7, kp8, kp9, kpSub, transp,
transp, kp4, kp5, kp6, kpAdd, transp,
transp, transp, kp1, kp2, kp3, kpEnter, transp,
transp, transp, period, kpEnter, transp,
transp, transp,
transp, transp, transp,
transp, transp, kp0 ),
// ............................................................................
};