X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=converter%2Fsun_usb%2Fkeymap.c;h=a106d1a3e1b6fc53f09d66a4da02a39ee32a0ccc;hb=9f041460313bc16e3f8a9677faced4d38d343d9a;hp=3d724a52013aef6f0b6bb72604e719957544a67d;hpb=79cfa894afbc0a94ac642f57de905d9afc068ce7;p=max%2Ftmk_keyboard.git diff --git a/converter/sun_usb/keymap.c b/converter/sun_usb/keymap.c index 3d724a52..a106d1a3 100644 --- a/converter/sun_usb/keymap.c +++ b/converter/sun_usb/keymap.c @@ -17,7 +17,6 @@ along with this program. If not, see . #include #include -#include #include "keycode.h" #include "util.h" #include "keymap.h" @@ -27,7 +26,7 @@ along with this program. If not, see . /* Sun type 5 keyboard ,-------. ,---, ,---------------. ,---------------. ,---------------. ,-----------. ,---------------. -| 76 | | | | 05| 06| 08| 0A| | 0C| 0E| 10| 11| | 12| 07| 09| 0B| | 16| 17| 15| | 2D| 02| 04| 30| +| 76 | | 0F| | 05| 06| 08| 0A| | 0C| 0E| 10| 11| | 12| 07| 09| 0B| | 16| 17| 15| | 2D| 02| 04| 30| `-------' `---' `---------------' `---------------' `---------------' `-----------' `---------------' ,-------. ,-----------------------------------------------------------. ,-----------. ,---------------. | 01| 03| | 1D| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 58| 2A| | 2C| 34| 60| | 62| 2E| 2F| 47| @@ -42,7 +41,7 @@ along with this program. If not, see . `-------' `-----------------------------------------------------------' `-----------' `---------------' */ #define KEYMAP( \ - K76, K05,K06,K08,K0A, K0C,K0E,K10,K11, K12,K07,K09,K0B, K16,K17,K15, K2D,K02,K04,K30, \ + K76, K0F, K05,K06,K08,K0A, K0C,K0E,K10,K11, K12,K07,K09,K0B, K16,K17,K15, K2D,K02,K04,K30, \ K01,K03, K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K58,K2A, K2C,K34,K60, K62,K2E,K2F,K47, \ K19,K1A, K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41, K2B, K42,K4A,K7B, K44,K45,K46,K7D, \ K31,K33, K4C, K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57, K59, K5B,K5C,K5D, \ @@ -50,7 +49,7 @@ along with this program. If not, see . K5F,K61, K77,K13, K78, K73, K79, K74, K75, K7A, K43, K0D, K18,K1B,K1C, K5E, K32 \ ) { \ { KC_NO, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \ - { KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_NO, }, \ + { KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_##K0F,}, \ { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17 }, \ { KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E, KC_##K1F }, \ { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, \ @@ -77,17 +76,17 @@ along with this program. If not, see . K63, K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K0D,K14,K6E, \ K77,K13, K78, K79, K7A,K43,K62,K18,K1B,K1C \ ) KEYMAP( \ - HELP, K05,K06,K08,K0A, K0C,K0E,K10,K11, K12,K07,K09,K0B, PSCR,SLCK,PAUS, MUTE,VOLD,VOLU,K30, \ + HELP, NO, K05,K06,K08,K0A, K0C,K0E,K10,K11, K12,K07,K09,K0B, PSCR,SLCK,PAUS, MUTE,VOLD,VOLU,K30, \ K01, AGAIN, K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K58,K2A, K2C, K34, K60, K62, PSLS,PAST,PMNS, \ - MENU, UNDO, K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41, K2B, K42, K4A, K7B, P7, P8, P9, PPLS, \ - SELECT, K33, K4C, K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57, K59, P4, P5, P6, \ - EXECUTE,K49, K63, K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K6E, K14, P1, P2, P3, PENT, \ - FIND, K61, K77,K13, K78, HENK, K79, MHEN, KANA, K7A,K43,K0D, K18, K1B, K1C, P0, PDOT \ + MENU, UNDO, K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41, K2B, K42, K4A, K7B, P7, P8, P9, PPLS, \ + SELECT, K33, K4C, K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57, K59, P4, P5, P6, \ + EXECUTE,K49, K63, K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K6E, K14, P1, P2, P3, PENT, \ + FIND, K61, K77,K13, K78, HENK, K79, MHEN, KANA, K7A,K43,K0D, K18, K1B, K1C, P0, PDOT \ ) // 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[] = { 2, // Fn0 3, // Fn1 4, // Fn2 @@ -100,7 +99,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_SCLN, // Fn1 KC_SLSH, // Fn2 @@ -112,7 +111,7 @@ 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] = { /* KEYMAP( HELP, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10,F11,F12, PSCR,SLCK,PAUS, MUTE,VOLD,VOLU,PWR, @@ -174,19 +173,3 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { CAPS,LALT,LGUI, BTN1, RGUI,RALT,NO, LEFT,DOWN,RGHT ), }; - - -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]); -}