From a0a5d525313f7c1cca9c3476a4e714a53a6b8506 Mon Sep 17 00:00:00 2001 From: Kai Ryu Date: Sat, 5 Jul 2014 21:43:21 +0900 Subject: [PATCH] Modify default keymap --- keyboard/smart68/keymap_common.c | 6 +++--- keyboard/smart68/keymap_common.h | 9 +-------- keyboard/smart68/keymap_default.c | 10 +++++----- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/keyboard/smart68/keymap_common.c b/keyboard/smart68/keymap_common.c index ae934eea..6ab88064 100644 --- a/keyboard/smart68/keymap_common.c +++ b/keyboard/smart68/keymap_common.c @@ -19,7 +19,7 @@ along with this program. If not, see . /* translates key to keycode */ uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) { -#ifndef KEYMAP_EX_ENABLE +#ifndef KEYMAP_IN_EEPROM_ENABLE return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); #else return eeconfig_read_keymap_key(layer, key.row, key.col); @@ -30,7 +30,7 @@ uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) action_t keymap_fn_to_action(uint8_t keycode) { return (action_t) { -#ifndef KEYMAP_EX_ENABLE +#ifndef KEYMAP_IN_EEPROM_ENABLE .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) #else .code = eeconfig_read_keymap_fn_action(FN_INDEX(keycode)) @@ -38,7 +38,7 @@ action_t keymap_fn_to_action(uint8_t keycode) }; } -#ifdef KEYMAP_EX_ENABLE +#ifdef KEYMAP_IN_EEPROM_ENABLE const uint8_t* keymaps_pointer(void) { return (const uint8_t*)keymaps; } diff --git a/keyboard/smart68/keymap_common.h b/keyboard/smart68/keymap_common.h index 0d09d964..a1991176 100644 --- a/keyboard/smart68/keymap_common.h +++ b/keyboard/smart68/keymap_common.h @@ -28,18 +28,11 @@ along with this program. If not, see . #include "print.h" #include "debug.h" #include "keymap.h" -#include "keymap_ex.h" +#include "keymap_in_eeprom.h" -/* -#ifdef KEYMAP_EX_ENABLE -extern const uint8_t keymaps[KEYMAPS_COUNT][MATRIX_ROWS][MATRIX_COLS]; -extern const uint16_t fn_actions[FN_ACTIONS_COUNT]; -#else -*/ extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; extern const uint16_t fn_actions[]; -//#endif /* SMART68 keymap definition macro */ diff --git a/keyboard/smart68/keymap_default.c b/keyboard/smart68/keymap_default.c index 3de14810..04d72441 100644 --- a/keyboard/smart68/keymap_default.c +++ b/keyboard/smart68/keymap_default.c @@ -32,9 +32,9 @@ const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { * ,---------------------------------------------------------------. * |Mut| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | | * |---------------------------------------------------------------| - * | | | | | | | | | | |Psc|Slk|Pau| Ins| | + * | | |Up | | | | | | | |Psc|Slk|Pau| Ins| | * |---------------------------------------------------------------| - * | | | | | | | | | | | | |Fn1 |Hom| + * | |Lef|Dow|Rig| | | | | | | | |Fn1 |Hom| * |---------------------------------------------------------------| * | | | | | | | | | | | | |VoU|End| * |---------------------------------------------------------------| @@ -45,8 +45,8 @@ const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { */ KEYMAP( MUTE,F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS,INS, TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, FN1, HOME, \ + TRNS,TRNS,UP, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS,INS, TRNS, \ + TRNS,LEFT,DOWN,RGHT,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, FN1, HOME, \ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,VOLU,END, \ TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,FN3, VOLD,FN3, \ TRNS ), @@ -67,7 +67,7 @@ const uint16_t fn_actions[] PROGMEM = { [3] = ACTION_BACKLIGHT_INCREASE() }; -#ifdef KEYMAP_EX_ENABLE +#ifdef KEYMAP_IN_EEPROM_ENABLE uint16_t keys_count(void) { return sizeof(keymaps) / sizeof(keymaps[0]) * MATRIX_ROWS * MATRIX_COLS; }