X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=hhkb%2Fkeymap.c;h=681658db0c08a60c5cd5f2ba66d67145a6aa5f23;hb=f382fc93d5cbee8209069d5da590177b8dbd4a02;hp=176201756693994ad484886a35754cf147fb876f;hpb=c5b9f2b02b3057b95ebb06092e8fae3ed6108197;p=max%2Ftmk_keyboard.git diff --git a/hhkb/keymap.c b/hhkb/keymap.c index 17620175..681658db 100644 --- a/hhkb/keymap.c +++ b/hhkb/keymap.c @@ -4,12 +4,12 @@ #include #include #include -#include "usb_keyboard.h" +#include "host.h" #include "usb_keycodes.h" #include "print.h" #include "debug.h" #include "util.h" -#include "keymap_skel.h" +#include "keymap.h" // Convert physical keyboard layout to matrix array. @@ -44,7 +44,7 @@ static const uint8_t PROGMEM fn_layer[] = { 4, // Fn4 0, // Fn5 0, // Fn6 - 1 // Fn7 + 0 // Fn7 }; // Assign Fn key(0-7) to a keycode sent when release Fn key without use of the layer. @@ -71,7 +71,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------| * |Shift | Z| X| C| V| B| N| M| ,| .|Fn2|Shift |Fn1| * `-----------------------------------------------------------' - * |Gui|Alt |Fn4 |Alt |Fn7| + * |Gui|Alt |Fn5 |Alt |Fn4| * `-------------------------------------------' */ KEYMAP(KB_ESC, KB_1, KB_2, KB_3, KB_4, KB_5, KB_6, KB_7, KB_8, KB_9, KB_0, KB_MINS,KB_EQL, KB_BSLS,KB_GRV, \ @@ -151,11 +151,19 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Gui |Alt |xxxxxxxxxxxxxxxxxxxxxxx|Alt |Gui| * `--------------------------------------------' */ +/* KEYMAP(KB_MINS,KB_0, KB_9, KB_8, KB_7, KB_6, KB_5, KB_4, KB_3, KB_2, KB_1, KB_NO, KB_NO, KB_NO, KB_ESC, \ KB_BSPC,KB_P, KB_O, KB_I, KB_U, KB_Y, KB_T, KB_R, KB_E, KB_W, KB_Q, KB_NO, KB_NO, KB_TAB, \ KB_LCTL,KB_SCLN,KB_L, KB_K, KB_J, KB_H, KB_G, KB_F, KB_D, KB_S, KB_A, KB_RCTL,KB_RCTL, \ KB_LSFT,KB_SLSH,KB_DOT, KB_COMM,KB_M, KB_N, KB_B, KB_V, KB_C, KB_X, KB_Z, KB_RSFT,KB_NO, \ KB_LGUI,KB_LALT,KB_FN4, KB_RALT,KB_RGUI) +*/ + /* Mouse mode (Space) */ + KEYMAP(KB_ESC, KB_F1, KB_F2, KB_F3, KB_F4, KB_F5, KB_F6, KB_F7, KB_F8, KB_F9, KB_F10, KB_F11, KB_F12, KB_INS, KB_DEL, \ + KB_TAB, KB_WH_L,KB_WH_U,KB_MS_U,KB_WH_D,KB_WH_R,KB_WH_L,KB_WH_D,KB_WH_U,KB_WH_R,KB_NO, KB_NO, KB_NO, KB_BSPC, \ + KB_LCTL,KB_NO, KB_MS_L,KB_MS_D,KB_MS_R,KB_NO, KB_MS_L,KB_MS_D,KB_MS_U,KB_MS_R,KB_FN3, KB_NO, KB_ENT, \ + KB_LSFT,KB_BTN4,KB_BTN5,KB_BTN1,KB_BTN2,KB_BTN3,KB_BTN2,KB_BTN1,KB_BTN4,KB_BTN5,KB_NO, KB_RSFT,KB_NO, \ + KB_LGUI,KB_LALT,KB_FN4, KB_RALT,KB_RGUI), }; @@ -173,9 +181,3 @@ uint8_t keymap_fn_keycode(uint8_t fn_bits) { return pgm_read_byte(&fn_keycode[(biton(fn_bits))]); } - -// define a condition to enter special function mode -bool keymap_is_special_mode(uint8_t fn_bits) -{ - return (usb_keyboard_mods == (BIT_LCTRL | BIT_LSHIFT | BIT_LALT | BIT_LGUI)); -}