X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=converter%2Fterminal_usb%2Fkeymap.c;h=55b127f058160486e3ec474baea89a29cc5a3755;hb=47775af20671e347e7e5545f63b42a51f0a4df04;hp=8ca66b5e6a103eeb65137e6886d298c56132ffc0;hpb=965110a0411bf64918ed8fd539139c00936ac9f5;p=max%2Ftmk_keyboard.git diff --git a/converter/terminal_usb/keymap.c b/converter/terminal_usb/keymap.c index 8ca66b5e..55b127f0 100644 --- a/converter/terminal_usb/keymap.c +++ b/converter/terminal_usb/keymap.c @@ -17,7 +17,6 @@ along with this program. If not, see . #include #include -#include #include "keycode.h" #include "print.h" #include "debug.h" @@ -102,7 +101,7 @@ along with this program. If not, see . } // Assign Fn key(0-7) to a layer to which switch with the Fn key pressed. -static const uint8_t PROGMEM fn_layer[] = { +const uint8_t PROGMEM fn_layer[] = { 0, // Fn0 0, // Fn1 0, // Fn2 @@ -115,7 +114,7 @@ static const uint8_t PROGMEM fn_layer[] = { // Assign Fn key(0-7) to a keycode sent when release Fn key without use of the layer. // See layer.c for details. -static const uint8_t PROGMEM fn_keycode[] = { +const uint8_t PROGMEM fn_keycode[] = { KC_NO, // Fn0 KC_NO, // Fn1 KC_NO, // Fn2 @@ -127,22 +126,26 @@ static const uint8_t PROGMEM fn_keycode[] = { }; -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: default - * ,---. ,---------------. ,---------------. ,---------------. ,-----------. - * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| - * `---' `---------------' `---------------' `---------------' `-----------' - * ,-----------------------------------------------------------. ,-----------. ,---------------. - * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|BS | |Ins|Hom|PgU| |NmL| /| *| -| - * |-----------------------------------------------------------| |-----------| |---------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| | - * |-----------------------------------------------------------| `-----------' |-----------| +| - * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '| #|Retu| | 4| 5| 6| | - * |-----------------------------------------------------------| ,---. |---------------| - * |Shif| \| Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| | - * |-----------------------------------------------------------| ,-----------. |-----------|Ent| - * |Ctrl| |Alt | Space |Alt | |Ctrl| |Lef|Dow|Rig| | 0| .| | - * `----' `---------------------------------------' `----' `-----------' `---------------' + * + * ,-----------------------------------------------. + * |F13|F14|F15|F16|F17|F18|F19|F20|F21|F22|F23|F24| + * `-----------------------------------------------' + * ,-----------------------------------------------. + * |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| + * `-----------------------------------------------' + * ,-------. ,-----------------------------------------------------------. ,-----------. ,---------------. + * |PrS|Esc| | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|BS | |Ins|Hom|PgU| |NmL| /| *| -| + * |-------| |-----------------------------------------------------------| |-----------| |---------------| + * |ScL|In4| |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| | + * |-------| |-----------------------------------------------------------| `-----------' |-----------| +| + * |Pau|In5| |CapsLo| A| S| D| F| G| H| J| K| L| ;| '| #|Retu| |Up | | 4| 5| 6| | + * |-------| |-----------------------------------------------------------| ,-----------. |---------------| + * |App|In6| |Shif| \| Z| X| C| V| B| N| M| ,| ,| /|Shift | |Lef|In2|Rig| | 1| 2| 3| | + * |-------| |-----------------------------------------------------------| `-----------' |-----------|Ent| + * |Gui|Gui| |Ctrl| |Alt | Space |Alt | |Ctrl| |Dow| | 0| .| | + * `-------' `----' `---------------------------------------' `----' `---' `---------------' */ /* KEYMAP( @@ -161,11 +164,11 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, - PSCR,ESC, ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NO, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, + PSCR,ESC, GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NO, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, SLCK,INT4, TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, NO, DEL, END, PGDN, P7, P8, P9, PPLS, - PAUS,INT5, LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, BSLS,ENT, UP, P4, P5, P6, PCMM, + PAUS,INT5, CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, BSLS,ENT, UP, P4, P5, P6, PCMM, APP, INT6, LSFT,LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, NO, RSFT, LEFT,INT2,RGHT, P1, P2, P3, PENT, - RGUI,LGUI, LCTL, LALT, SPC, LGUI, GRV, DOWN, NO, P0, PDOT,NO + RGUI,LGUI, LCTL, LALT, SPC, RALT, RCTL, DOWN, NO, P0, PDOT,NO ), /* 101-key keymaps @@ -198,19 +201,3 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), */ }; - - -uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col) -{ - return pgm_read_byte(&keymaps[(layer)][(row)][(col)]); -} - -uint8_t keymap_fn_layer(uint8_t index) -{ - return pgm_read_byte(&fn_layer[index]); -} - -uint8_t keymap_fn_keycode(uint8_t index) -{ - return pgm_read_byte(&fn_keycode[index]); -}