diff options
Diffstat (limited to 'keyboard')
-rw-r--r-- | keyboard/IIgs/config.h | 6 | ||||
-rw-r--r-- | keyboard/hhkb/Makefile | 18 | ||||
-rw-r--r-- | keyboard/hhkb/config.h | 3 | ||||
-rw-r--r-- | keyboard/hhkb/config_iwrap.h | 5 | ||||
-rw-r--r-- | keyboard/hhkb/config_vusb.h | 6 | ||||
-rw-r--r-- | keyboard/hhkb/keymap.c | 19 |
6 files changed, 26 insertions, 31 deletions
diff --git a/keyboard/IIgs/config.h b/keyboard/IIgs/config.h index 0039cb48b5..bc8bf75f94 100644 --- a/keyboard/IIgs/config.h +++ b/keyboard/IIgs/config.h @@ -56,10 +56,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LAYER_SEND_FN_TERM 300
-/* mouse keys */
-#ifdef MOUSEKEY_ENABLE
-# define MOUSEKEY_DELAY_TIME 192
-#endif
+/* legacy keymap support */
+#define USE_LEGACY_KEYMAP
#endif
diff --git a/keyboard/hhkb/Makefile b/keyboard/hhkb/Makefile index 1ef0a0187a..94078702c4 100644 --- a/keyboard/hhkb/Makefile +++ b/keyboard/hhkb/Makefile @@ -111,12 +111,13 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # USB Nkey Rollover +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover +KEYMAP_SECTION_ENABLE = yes # fixed address keymap for keymap editor # Search Path @@ -127,5 +128,8 @@ include $(TOP_DIR)/protocol/lufa.mk include $(TOP_DIR)/common.mk include $(TOP_DIR)/rules.mk -debug-on: EXTRAFLAGS += -DDEBUG +debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION debug-on: all + +debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT +debug-off: all diff --git a/keyboard/hhkb/config.h b/keyboard/hhkb/config.h index 83a911beab..a8f76ae6b0 100644 --- a/keyboard/hhkb/config.h +++ b/keyboard/hhkb/config.h @@ -40,7 +40,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define TAPPING_TERM 300 /* tap count needed for toggling a feature */ #define TAPPING_TOGGLE 5 - +/* Oneshot timeout(ms) */ +#define ONESHOT_TIMEOUT 300 /* Boot Magic salt key: Space */ #define BOOTMAGIC_KEY_SALT KC_FN6 diff --git a/keyboard/hhkb/config_iwrap.h b/keyboard/hhkb/config_iwrap.h index 80a608882d..747c755132 100644 --- a/keyboard/hhkb/config_iwrap.h +++ b/keyboard/hhkb/config_iwrap.h @@ -34,11 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key combination for command */ #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) -/* mouse keys */ -#ifdef MOUSEKEY_ENABLE -# define MOUSEKEY_DELAY_TIME 255 -#endif - /* pins for Software UART */ #define SUART_IN_PIN PINC #define SUART_IN_BIT 5 diff --git a/keyboard/hhkb/config_vusb.h b/keyboard/hhkb/config_vusb.h index 37d3e4f228..44f7acd6cd 100644 --- a/keyboard/hhkb/config_vusb.h +++ b/keyboard/hhkb/config_vusb.h @@ -35,10 +35,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key combination for command */ #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) -/* mouse keys */ -#ifdef MOUSEKEY_ENABLE -# define MOUSEKEY_DELAY_TIME 100 -#endif - - #endif diff --git a/keyboard/hhkb/keymap.c b/keyboard/hhkb/keymap.c index faa62dd7e1..f2c6caf480 100644 --- a/keyboard/hhkb/keymap.c +++ b/keyboard/hhkb/keymap.c @@ -48,8 +48,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_NO } \ } - -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +#ifdef KEYMAP_SECTION_ENABLE +const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] __attribute__ ((section (".keymap.keymaps"))) = { +#else +static const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { +#endif /* Layer 0: Default Layer * ,-----------------------------------------------------------. * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| @@ -186,7 +189,11 @@ enum macro_id { /* * Fn action definition */ -static const uint16_t PROGMEM fn_actions[] = { +#ifdef KEYMAP_SECTION_ENABLE +const uint16_t fn_actions[] __attribute__ ((section (".keymap.fn_actions"))) = { +#else +static const uint16_t fn_actions[] PROGMEM = { +#endif [0] = ACTION_DEFAULT_LAYER_SET(0), // Default layer(not used) [1] = ACTION_LAYER_TAP_TOGGLE(1), // HHKB layer(toggle with 5 taps) [2] = ACTION_LAYER_TAP_KEY(2, KC_SLASH), // Cursor layer with Slash* @@ -310,10 +317,6 @@ uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) action_t keymap_fn_to_action(uint8_t keycode) { action_t action; - if (FN_INDEX(keycode) < sizeof(fn_actions) / sizeof(fn_actions[0])) { - action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]); - } else { - action.code = ACTION_NO; - } + action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]); return action; } |