From 373ab0e7192811944786c095facb80938c33f1d5 Mon Sep 17 00:00:00 2001 From: tmk Date: Tue, 9 Oct 2012 14:36:13 +0900 Subject: Add keycode.h and remove usb_keycodes.h. --- common/keycode.h | 441 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 441 insertions(+) create mode 100644 common/keycode.h (limited to 'common/keycode.h') diff --git a/common/keycode.h b/common/keycode.h new file mode 100644 index 000000000..4ed78a46a --- /dev/null +++ b/common/keycode.h @@ -0,0 +1,441 @@ +/* +Copyright 2011,2012 Jun Wako + +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 . +*/ + +/* + * Keycodes based on HID Usage Keyboard/Keypad Page(0x07) plus special codes + * http://www.usb.org/developers/devclass_docs/Hut1_12.pdf + */ +#ifndef KEYCODE_H +#define KEYCODE_H + + +#define IS_ERROR(code) (KC_ROLL_OVER <= (code) && (code) <= KC_UNDEFINED) +#define IS_ANY(code) (KC_A <= (code) && (code) <= 0xFF) +#define IS_KEY(code) (KC_A <= (code) && (code) <= KC_EXSEL) +#define IS_MOD(code) (KC_LCTRL <= (code) && (code) <= KC_RGUI) + +#define IS_FN(code) (KC_FN0 <= (code) && (code) <= KC_FN7) +#define IS_MOUSEKEY(code) (KC_MS_UP <= (code) && (code) <= KC_MS_WH_RIGHT) +#define IS_MOUSEKEY_MOVE(code) (KC_MS_UP <= (code) && (code) <= KC_MS_RIGHT) +#define IS_MOUSEKEY_BUTTON(code) (KC_MS_BTN1 <= (code) && (code) <= KC_MS_BTN5) +#define IS_MOUSEKEY_WHEEL(code) (KC_MS_WH_UP <= (code) && (code) <= KC_MS_WH_RIGHT) + +#define IS_SPECIAL(code) ((0xB0 <= (code) && (code) <= 0xDF) || (0xE8 <= (code) && (code) <= 0xFF)) +#define IS_CONSUMER(code) (KC_MUTE <= (code) && (code) <= KC_WFAV) +#define IS_SYSTEM(code) (KC_POWER <= (code) && (code) <= KC_WAKE) + +#define MOD_BIT(code) (1< */ + KC_SLASH, /* / and ? */ + KC_CAPSLOCK, + KC_F1, + KC_F2, + KC_F3, + KC_F4, + KC_F5, + KC_F6, + KC_F7, /* 0x40 */ + KC_F8, + KC_F9, + KC_F10, + KC_F11, + KC_F12, + KC_PSCREEN, + KC_SCKLOCK, + KC_PAUSE, + KC_INSERT, + KC_HOME, + KC_PGUP, + KC_DELETE, + KC_END, + KC_PGDOWN, + KC_RIGHT, + KC_LEFT, /* 0x50 */ + KC_DOWN, + KC_UP, + KC_NUMLOCK, + KC_KP_SLASH, + KC_KP_ASTERISK, + KC_KP_MINUS, + KC_KP_PLUS, + KC_KP_ENTER, + KC_KP_1, + KC_KP_2, + KC_KP_3, + KC_KP_4, + KC_KP_5, + KC_KP_6, + KC_KP_7, + KC_KP_8, /* 0x60 */ + KC_KP_9, + KC_KP_0, + KC_KP_DOT, + KC_NONUS_BSLASH, /* Non-US \ and | */ + KC_APPLICATION, + KC_POWER, + KC_KP_EQUAL, + KC_F13, + KC_F14, + KC_F15, + KC_F16, + KC_F17, + KC_F18, + KC_F19, + KC_F20, + KC_F21, /* 0x70 */ + KC_F22, + KC_F23, + KC_F24, + KC_EXECUTE, + KC_HELP, + KC_MENU, + KC_SELECT, + KC_STOP, + KC_AGAIN, + KC_UNDO, + KC_CUT, + KC_COPY, + KC_PASTE, + KC_FIND, + KC__MUTE, + KC__VOLUP, /* 0x80 */ + KC__VOLDOWN, + KC_LOCKING_CAPS, /* locking Caps Lock */ + KC_LOCKING_NUM, /* locking Num Lock */ + KC_LOCKING_SCROLL, /* locking Scroll Lock */ + KC_KP_COMMA, + KC_KP_EQUAL_AS400, /* equal sign on AS/400 */ + KC_INT1, + KC_INT2, + KC_INT3, + KC_INT4, + KC_INT5, + KC_INT6, + KC_INT7, + KC_INT8, + KC_INT9, + KC_LANG1, /* 0x90 */ + KC_LANG2, + KC_LANG3, + KC_LANG4, + KC_LANG5, + KC_LANG6, + KC_LANG7, + KC_LANG8, + KC_LANG9, + KC_ALT_ERASE, + KC_SYSREQ, + KC_CANCEL, + KC_CLEAR, + KC_PRIOR, + KC_RETURN, + KC_SEPARATOR, + KC_OUT, /* 0xA0 */ + KC_OPER, + KC_CLEAR_AGAIN, + KC_CRSEL, + KC_EXSEL, /* 0xA4 */ + + /* NOTE: 0xA5-DF are used for internal special purpose */ + +#if 0 + /* NOTE: Following codes(0xB0-DD) are not used. Leave them for reference. */ + KC_KP_00 = 0xB0, + KC_KP_000, + KC_THOUSANDS_SEPARATOR, + KC_DECIMAL_SEPARATOR, + KC_CURRENCY_UNIT, + KC_CURRENCY_SUB_UNIT, + KC_KP_LPAREN, + KC_KP_RPAREN, + KC_KP_LCBRACKET, /* { */ + KC_KP_RCBRACKET, /* } */ + KC_KP_TAB, + KC_KP_BSPACE, + KC_KP_A, + KC_KP_B, + KC_KP_C, + KC_KP_D, + KC_KP_E, /* 0xC0 */ + KC_KP_F, + KC_KP_XOR, + KC_KP_HAT, + KC_KP_PERC, + KC_KP_LT, + KC_KP_GT, + KC_KP_AND, + KC_KP_LAZYAND, + KC_KP_OR, + KC_KP_LAZYOR, + KC_KP_COLON, + KC_KP_HASH, + KC_KP_SPACE, + KC_KP_ATMARK, + KC_KP_EXCLAMATION, + KC_KP_MEM_STORE, /* 0xD0 */ + KC_KP_MEM_RECALL, + KC_KP_MEM_CLEAR, + KC_KP_MEM_ADD, + KC_KP_MEM_SUB, + KC_KP_MEM_MUL, + KC_KP_MEM_DIV, + KC_KP_PLUS_MINUS, + KC_KP_CLEAR, + KC_KP_CLEAR_ENTRY, + KC_KP_BINARY, + KC_KP_OCTAL, + KC_KP_DECIMAL, + KC_KP_HEXADECIMAL, /* 0xDD */ +#endif + + /* Modifiers */ + KC_LCTRL = 0xE0, + KC_LSHIFT, + KC_LALT, + KC_LGUI, + KC_RCTRL, + KC_RSHIFT, + KC_RALT, + KC_RGUI, + + /* NOTE: 0xE8-FF are used for internal special purpose */ +}; + +/* Special keycodes */ +/* NOTE: 0xA5-DF and 0xE8-FF are used for internal special purpose */ +enum internal_special_keycodes { + /* System Control */ + KC_SYSTEM_POWER = 0xA5, + KC_SYSTEM_SLEEP, + KC_SYSTEM_WAKE, /* 0xA7 */ + /* 0xA8-AF */ + + /* Consumer Page */ + KC_AUDIO_MUTE = 0xB0, + KC_AUDIO_VOL_UP, + KC_AUDIO_VOL_DOWN, + KC_MEDIA_NEXT_TRACK, + KC_MEDIA_PREV_TRACK, + KC_MEDIA_STOP, + KC_MEDIA_PLAY_PAUSE, + KC_MEDIA_SELECT, + KC_MAIL, + KC_CALCULATOR, + KC_MY_COMPUTER, + KC_WWW_SEARCH, + KC_WWW_HOME, + KC_WWW_BACK, + KC_WWW_FORWARD, + KC_WWW_STOP, + KC_WWW_REFRESH, /* 0xC0 */ + KC_WWW_FAVORITES, /* 0xC1 */ + /* 0xC2-DF vacant for future use */ + + /* 0xE0-E7 for Modifiers. DO NOT USE. */ + + /* Layer Switching */ + KC_FN0 = 0xE8, + KC_FN1, + KC_FN2, + KC_FN3, + KC_FN4, + KC_FN5, + KC_FN6, + KC_FN7, /* 0xEF */ + + /* Mousekey */ + KC_MS_UP = 0xF0, + KC_MS_DOWN, + KC_MS_LEFT, + KC_MS_RIGHT, + KC_MS_BTN1, + KC_MS_BTN2, + KC_MS_BTN3, + KC_MS_BTN4, + KC_MS_BTN5, + /* Mousekey wheel */ + KC_MS_WH_UP, + KC_MS_WH_DOWN, + KC_MS_WH_LEFT, + KC_MS_WH_RIGHT, /* 0xFC */ + /* 0xFD-FF vacant for future use */ +}; + +#endif /* KEYCODE_H */ -- cgit v1.2.3-70-g09d2 From 8f7ed2bc1902cdeeb78c49f4833816a33cd6d3a0 Mon Sep 17 00:00:00 2001 From: tmk Date: Wed, 17 Oct 2012 03:27:25 +0900 Subject: Add Mousekey parameters and accel keys. --- common/keycode.h | 13 ++++-- common/mousekey.c | 106 +++++++++++++++++++++++-------------------------- common/mousekey.h | 39 ++++++++++++++++++ keyboard/hhkb/keymap.c | 8 ++-- 4 files changed, 103 insertions(+), 63 deletions(-) (limited to 'common/keycode.h') diff --git a/common/keycode.h b/common/keycode.h index 4ed78a46a..f9331cdbf 100644 --- a/common/keycode.h +++ b/common/keycode.h @@ -29,10 +29,11 @@ along with this program. If not, see . #define IS_MOD(code) (KC_LCTRL <= (code) && (code) <= KC_RGUI) #define IS_FN(code) (KC_FN0 <= (code) && (code) <= KC_FN7) -#define IS_MOUSEKEY(code) (KC_MS_UP <= (code) && (code) <= KC_MS_WH_RIGHT) +#define IS_MOUSEKEY(code) (KC_MS_UP <= (code) && (code) <= KC_MS_ACCEL2) #define IS_MOUSEKEY_MOVE(code) (KC_MS_UP <= (code) && (code) <= KC_MS_RIGHT) #define IS_MOUSEKEY_BUTTON(code) (KC_MS_BTN1 <= (code) && (code) <= KC_MS_BTN5) #define IS_MOUSEKEY_WHEEL(code) (KC_MS_WH_UP <= (code) && (code) <= KC_MS_WH_RIGHT) +#define IS_MOUSEKEY_ACCEL(code) (KC_MS_ACCEL0 <= (code) && (code) <= KC_MS_ACCEL2) #define IS_SPECIAL(code) ((0xB0 <= (code) && (code) <= 0xDF) || (0xE8 <= (code) && (code) <= 0xFF)) #define IS_CONSUMER(code) (KC_MUTE <= (code) && (code) <= KC_WFAV) @@ -120,6 +121,9 @@ along with this program. If not, see . #define KC_WH_D KC_MS_WH_DOWN #define KC_WH_L KC_MS_WH_LEFT #define KC_WH_R KC_MS_WH_RIGHT +#define KC_ACL0 KC_MS_ACCEL0 +#define KC_ACL1 KC_MS_ACCEL1 +#define KC_ACL2 KC_MS_ACCEL2 /* Sytem Control */ #define KC_PWR KC_SYSTEM_POWER #define KC_SLEP KC_SYSTEM_SLEEP @@ -429,13 +433,16 @@ enum internal_special_keycodes { KC_MS_BTN2, KC_MS_BTN3, KC_MS_BTN4, - KC_MS_BTN5, + KC_MS_BTN5, /* 0xF8 */ /* Mousekey wheel */ KC_MS_WH_UP, KC_MS_WH_DOWN, KC_MS_WH_LEFT, KC_MS_WH_RIGHT, /* 0xFC */ - /* 0xFD-FF vacant for future use */ + /* Mousekey accel */ + KC_MS_ACCEL0, + KC_MS_ACCEL1, + KC_MS_ACCEL2 /* 0xFF */ }; #endif /* KEYCODE_H */ diff --git a/common/mousekey.c b/common/mousekey.c index 99e6d34ff..b8af3e59c 100644 --- a/common/mousekey.c +++ b/common/mousekey.c @@ -27,40 +27,11 @@ along with this program. If not, see . static uint8_t mousekey_repeat = 0; +static uint8_t mousekey_accel = 0; static void mousekey_debug(void); -/* max value on report descriptor */ -#define MOUSEKEY_MOVE_MAX 127 -#define MOUSEKEY_WHEEL_MAX 15 - -#ifndef MOUSEKEY_MOVE_DELTA -#define MOUSEKEY_MOVE_DELTA 5 -#endif -#ifndef MOUSEKEY_WHEEL_DELTA -#define MOUSEKEY_WHEEL_DELTA 1 -#endif -#ifndef MOUSEKEY_DELAY -#define MOUSEKEY_DELAY 300 -#endif -#ifndef MOUSEKEY_INTERVAL -#define MOUSEKEY_INTERVAL 50 -#endif -#ifndef MOUSEKEY_MAX_SPEED -#define MOUSEKEY_MAX_SPEED 10 -#endif -#ifndef MOUSEKEY_TIME_TO_MAX -#define MOUSEKEY_TIME_TO_MAX 20 -#endif -#ifndef MOUSEKEY_WHEEL_MAX_SPEED -#define MOUSEKEY_WHEEL_MAX_SPEED 8 -#endif -#ifndef MOUSEKEY_WHEEL_TIME_TO_MAX -#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 -#endif - - /* * Mouse keys acceleration algorithm * http://en.wikipedia.org/wiki/Mouse_keys @@ -68,18 +39,18 @@ static void mousekey_debug(void); * speed = delta * max_speed * (repeat / time_to_max)**((1000+curve)/1000) */ /* milliseconds between the initial key press and first repeated motion event (0-2550) */ -static uint8_t mk_delay = MOUSEKEY_DELAY/10; +uint8_t mk_delay = MOUSEKEY_DELAY/10; /* milliseconds between repeated motion events (0-255) */ -static uint8_t mk_interval = MOUSEKEY_INTERVAL; +uint8_t mk_interval = MOUSEKEY_INTERVAL; /* steady speed (in action_delta units) applied each event (0-255) */ -static uint8_t mk_max_speed = MOUSEKEY_MAX_SPEED; +uint8_t mk_max_speed = MOUSEKEY_MAX_SPEED; /* number of events (count) accelerating to steady speed (0-255) */ -static uint8_t mk_time_to_max = MOUSEKEY_TIME_TO_MAX; +uint8_t mk_time_to_max = MOUSEKEY_TIME_TO_MAX; /* ramp used to reach maximum pointer speed (NOT SUPPORTED) */ -//static int8_t mk_curve = 0; - -static uint8_t mk_wheel_max_speed = MOUSEKEY_WHEEL_MAX_SPEED; -static uint8_t mk_wheel_time_to_max = MOUSEKEY_WHEEL_TIME_TO_MAX; +//int8_t mk_curve = 0; +/* wheel params */ +uint8_t mk_wheel_max_speed = MOUSEKEY_WHEEL_MAX_SPEED; +uint8_t mk_wheel_time_to_max = MOUSEKEY_WHEEL_TIME_TO_MAX; static uint16_t last_timer = 0; @@ -88,25 +59,39 @@ static uint16_t last_timer = 0; static uint8_t move_unit(void) { uint16_t unit; - if (mousekey_repeat > mk_time_to_max) { + if (mousekey_accel & (1<<0)) { + unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed)/4; + } else if (mousekey_accel & (1<<1)) { + unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed)/2; + } else if (mousekey_accel & (1<<2)) { + unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed); + } else if (mousekey_repeat == 0) { + unit = MOUSEKEY_MOVE_DELTA; + } else if (mousekey_repeat >= mk_time_to_max) { unit = MOUSEKEY_MOVE_DELTA * mk_max_speed; } else { unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed * mousekey_repeat) / mk_time_to_max; } - if (unit == 0) return 1; - return (unit > MOUSEKEY_MOVE_MAX ? MOUSEKEY_MOVE_MAX : unit); + return (unit > MOUSEKEY_MOVE_MAX ? MOUSEKEY_MOVE_MAX : (unit == 0 ? 1 : unit)); } static uint8_t wheel_unit(void) { uint16_t unit; - if (mousekey_repeat > mk_time_to_max) { + if (mousekey_accel & (1<<0)) { + unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed)/4; + } else if (mousekey_accel & (1<<1)) { + unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed)/2; + } else if (mousekey_accel & (1<<2)) { + unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed); + } else if (mousekey_repeat == 0) { + unit = MOUSEKEY_WHEEL_DELTA; + } else if (mousekey_repeat >= mk_time_to_max) { unit = MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed; } else { unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed * mousekey_repeat) / mk_wheel_time_to_max; } - if (unit == 0) return 1; - return (unit > MOUSEKEY_WHEEL_MAX ? MOUSEKEY_WHEEL_MAX : unit); + return (unit > MOUSEKEY_WHEEL_MAX ? MOUSEKEY_WHEEL_MAX : (unit == 0 ? 1 : unit)); } void mousekey_task(void) @@ -126,6 +111,7 @@ void mousekey_task(void) if (mouse_report.y > 0) mouse_report.y = move_unit(); if (mouse_report.y < 0) mouse_report.y = move_unit() * -1; + /* diagonal move [1/sqrt(2) = 0.7] */ if (mouse_report.x && mouse_report.y) { mouse_report.x *= 0.7; mouse_report.y *= 0.7; @@ -141,19 +127,22 @@ void mousekey_task(void) void mousekey_on(uint8_t code) { - if (code == KC_MS_UP) mouse_report.y = MOUSEKEY_MOVE_DELTA * -1; - else if (code == KC_MS_DOWN) mouse_report.y = MOUSEKEY_MOVE_DELTA; - else if (code == KC_MS_LEFT) mouse_report.x = MOUSEKEY_MOVE_DELTA * -1; - else if (code == KC_MS_RIGHT) mouse_report.x = MOUSEKEY_MOVE_DELTA; - else if (code == KC_MS_WH_UP) mouse_report.v = MOUSEKEY_WHEEL_DELTA; - else if (code == KC_MS_WH_DOWN) mouse_report.v = MOUSEKEY_WHEEL_DELTA * -1; - else if (code == KC_MS_WH_LEFT) mouse_report.h = MOUSEKEY_WHEEL_DELTA * -1; - else if (code == KC_MS_WH_RIGHT) mouse_report.h = MOUSEKEY_WHEEL_DELTA; + if (code == KC_MS_UP) mouse_report.y = move_unit() * -1; + else if (code == KC_MS_DOWN) mouse_report.y = move_unit(); + else if (code == KC_MS_LEFT) mouse_report.x = move_unit() * -1; + else if (code == KC_MS_RIGHT) mouse_report.x = move_unit(); + else if (code == KC_MS_WH_UP) mouse_report.v = wheel_unit(); + else if (code == KC_MS_WH_DOWN) mouse_report.v = wheel_unit() * -1; + else if (code == KC_MS_WH_LEFT) mouse_report.h = wheel_unit() * -1; + else if (code == KC_MS_WH_RIGHT) mouse_report.h = wheel_unit(); else if (code == KC_MS_BTN1) mouse_report.buttons |= MOUSE_BTN1; else if (code == KC_MS_BTN2) mouse_report.buttons |= MOUSE_BTN2; else if (code == KC_MS_BTN3) mouse_report.buttons |= MOUSE_BTN3; else if (code == KC_MS_BTN4) mouse_report.buttons |= MOUSE_BTN4; else if (code == KC_MS_BTN5) mouse_report.buttons |= MOUSE_BTN5; + else if (code == KC_MS_ACCEL0) mousekey_accel |= (1<<0); + else if (code == KC_MS_ACCEL1) mousekey_accel |= (1<<1); + else if (code == KC_MS_ACCEL2) mousekey_accel |= (1<<2); } void mousekey_off(uint8_t code) @@ -171,6 +160,9 @@ void mousekey_off(uint8_t code) else if (code == KC_MS_BTN3) mouse_report.buttons &= ~MOUSE_BTN3; else if (code == KC_MS_BTN4) mouse_report.buttons &= ~MOUSE_BTN4; else if (code == KC_MS_BTN5) mouse_report.buttons &= ~MOUSE_BTN5; + else if (code == KC_MS_ACCEL0) mousekey_accel &= ~(1<<0); + else if (code == KC_MS_ACCEL1) mousekey_accel &= ~(1<<1); + else if (code == KC_MS_ACCEL2) mousekey_accel &= ~(1<<2); if (mouse_report.x == 0 && mouse_report.y == 0 && mouse_report.v == 0 && mouse_report.h == 0) mousekey_repeat = 0; @@ -186,17 +178,19 @@ void mousekey_send(void) void mousekey_clear(void) { mouse_report = (report_mouse_t){}; + mousekey_repeat = 0; + mousekey_accel = 0; } static void mousekey_debug(void) { if (!debug_mouse) return; - print("mousekey [btn|x y v h]rep: ["); + print("mousekey [btn|x y v h](rep/acl): ["); phex(mouse_report.buttons); print("|"); phex(mouse_report.x); print(" "); phex(mouse_report.y); print(" "); phex(mouse_report.v); print(" "); - phex(mouse_report.h); print("]"); - phex(mousekey_repeat); - print("\n"); + phex(mouse_report.h); print("]("); + phex(mousekey_repeat); print("/"); + phex(mousekey_accel); print(")\n"); } diff --git a/common/mousekey.h b/common/mousekey.h index 3006c4634..ac26a46c8 100644 --- a/common/mousekey.h +++ b/common/mousekey.h @@ -21,6 +21,45 @@ along with this program. If not, see . #include #include "host.h" + +/* max value on report descriptor */ +#define MOUSEKEY_MOVE_MAX 127 +#define MOUSEKEY_WHEEL_MAX 127 + +#ifndef MOUSEKEY_MOVE_DELTA +#define MOUSEKEY_MOVE_DELTA 5 +#endif +#ifndef MOUSEKEY_WHEEL_DELTA +#define MOUSEKEY_WHEEL_DELTA 1 +#endif +#ifndef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 300 +#endif +#ifndef MOUSEKEY_INTERVAL +#define MOUSEKEY_INTERVAL 50 +#endif +#ifndef MOUSEKEY_MAX_SPEED +#define MOUSEKEY_MAX_SPEED 10 +#endif +#ifndef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 20 +#endif +#ifndef MOUSEKEY_WHEEL_MAX_SPEED +#define MOUSEKEY_WHEEL_MAX_SPEED 16 +#endif +#ifndef MOUSEKEY_WHEEL_TIME_TO_MAX +#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 +#endif + + +uint8_t mk_delay; +uint8_t mk_interval; +uint8_t mk_max_speed; +uint8_t mk_time_to_max; +uint8_t mk_wheel_max_speed; +uint8_t mk_wheel_time_to_max; + + void mousekey_task(void); void mousekey_on(uint8_t code); void mousekey_off(uint8_t code); diff --git a/keyboard/hhkb/keymap.c b/keyboard/hhkb/keymap.c index 3cfa5ff33..659a540b1 100644 --- a/keyboard/hhkb/keymap.c +++ b/keyboard/hhkb/keymap.c @@ -59,7 +59,7 @@ static const uint8_t PROGMEM fn_layer[] = { 2, // Fn2 3, // Fn3 3, // Fn4 - 4, // Fn5 + 5, // Fn5 0, // Fn6 0 // Fn7 }; @@ -162,9 +162,9 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LGUI,LALT, BTN1, RALT,FN4), #else KEYMAP(ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \ - TAB, WH_L,WH_U,MS_U,WH_D,WH_R,WH_L,WH_D,WH_U,WH_R,NO, NO, NO, BSPC, \ - LCTL,NO, MS_L,MS_D,MS_R,NO, MS_L,MS_D,MS_U,MS_R,FN3, NO, ENT, \ - LSFT,BTN4,BTN5,BTN1,BTN2,BTN3,BTN2,BTN1,BTN4,BTN5,NO, RSFT,NO, \ + TAB, NO, NO, NO, NO, NO, WH_L,WH_D,WH_U,WH_R,NO, NO, NO, BSPC, \ + LCTL,NO, ACL0,ACL1,ACL2,NO, MS_L,MS_D,MS_U,MS_R,FN3, NO, ENT, \ + LSFT,NO, NO, NO, NO, BTN3,BTN2,BTN1,BTN4,BTN5,NO, RSFT,NO, \ LGUI,LALT, BTN1, RALT,FN4), #endif -- cgit v1.2.3-70-g09d2