summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2015-01-14 22:48:54 -0500
committerJack Humbert <jack.humb@gmail.com>2015-01-14 22:48:54 -0500
commita54da1b92663606f5e5c18bc1eaec30c06847da1 (patch)
treea1b7485debf62a8c52d1db3199436cac2f3ce346
parent4225f0353c2eb85fbd8ca0622eb89757975093e4 (diff)
parent10a6b2c7d8bc9c5d2657acdeefa1102be5035280 (diff)
Merge remote-tracking branch 'upstream/master'
-rw-r--r--.gitmodules6
-rw-r--r--README.md2
-rw-r--r--common/command.c1
-rw-r--r--common/keycode.h10
-rw-r--r--common/matrix.h9
-rw-r--r--common/mbed/xprintf.cpp5
-rw-r--r--common/print.c12
-rw-r--r--common/report.h5
-rw-r--r--converter/ps2_usb/Makefile.mbed2
-rw-r--r--converter/terminal_bluefruit/Makefile16
-rw-r--r--converter/terminal_usb/Makefile15
-rw-r--r--converter/usb_usb/Makefile12
-rw-r--r--converter/usb_usb/README51
-rw-r--r--converter/usb_usb/config.h4
-rw-r--r--converter/usb_usb/keymap.c128
-rw-r--r--converter/usb_usb/keymap_common.c31
-rw-r--r--converter/usb_usb/keymap_common.h77
-rw-r--r--converter/usb_usb/keymap_hasu.c158
-rw-r--r--converter/usb_usb/keymap_spacefn.c61
-rw-r--r--converter/usb_usb/main.cpp14
-rw-r--r--keyboard/hhkb/Makefile10
-rw-r--r--keyboard/hhkb/Makefile.jp2
-rw-r--r--keyboard/hhkb/README.md7
-rw-r--r--keyboard/infinity/Makefile37
-rw-r--r--keyboard/infinity/README81
-rw-r--r--keyboard/infinity/config.h39
-rw-r--r--keyboard/infinity/keymap.c47
-rw-r--r--keyboard/infinity/keymap_common.c30
-rw-r--r--keyboard/infinity/keymap_common.h58
-rw-r--r--keyboard/infinity/led.c25
-rw-r--r--keyboard/infinity/main.cpp44
-rw-r--r--keyboard/infinity/matrix.c107
-rw-r--r--keyboard/infinity/mbed-infinity.mk47
-rw-r--r--keyboard/infinity/mbed-infinity/README39
-rw-r--r--keyboard/infinity/mbed-infinity/USBHAL_KL25Z.cpp557
-rw-r--r--keyboard/infinity/mbed-infinity/cmsis_nvic.c55
-rw-r--r--keyboard/infinity/mbed-infinity/infinity.ld156
-rw-r--r--keyboard/infinity/mbed-infinity/system_MK20D5.c299
-rw-r--r--keyboard/infinity/tool/README25
-rw-r--r--keyboard/infinity/tool/k20dx32_flash.cfg124
-rw-r--r--keyboard/infinity/tool/openocd.cfg13
-rw-r--r--protocol.mk2
-rw-r--r--protocol/bluefruit/bluefruit.c4
-rw-r--r--protocol/bluefruit/main.c2
-rw-r--r--protocol/pjrc/main.c3
-rw-r--r--protocol/pjrc/usb_keyboard.c2
-rw-r--r--protocol/ps2_interrupt.c1
-rw-r--r--protocol/ps2_io_avr.c1
-rw-r--r--protocol/ps2_usart.c1
-rw-r--r--protocol/usb_hid.mk1
m---------protocol/usb_hid/USB_Host_Shield_2.00
-rw-r--r--tool/mbed/common.mk2
-rw-r--r--tool/mbed/gcc.mk37
-rw-r--r--tool/mbed/lpc11u35_501.mk50
-rw-r--r--tool/mbed/mbed.mk150
55 files changed, 2399 insertions, 278 deletions
diff --git a/.gitmodules b/.gitmodules
index 17a20decb7..e21f449613 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,6 +1,6 @@
-[submodule "protocol/usb_hid/USB_Host_Shield_2.0"]
- path = protocol/usb_hid/USB_Host_Shield_2.0
- url = git@github.com:tmk/USB_Host_Shield_2.0.git
[submodule "protocol/lufa/LUFA-git"]
path = protocol/lufa/LUFA-git
url = https://github.com/abcminiuser/lufa.git
+[submodule "protocol/usb_hid/USB_Host_Shield_2.0"]
+ path = protocol/usb_hid/USB_Host_Shield_2.0
+ url = https://github.com/felis/USB_Host_Shield_2.0.git
diff --git a/README.md b/README.md
index a01de8c6f8..e077fc928d 100644
--- a/README.md
+++ b/README.md
@@ -53,6 +53,7 @@ You can find some keyboard specific projects under `converter` and `keyboard` di
* [macway](keyboard/macway/) - [Compact keyboard mod][GH_macway] [retired]
* [KMAC](keyboard/kmac/) - Korean custom keyboard
* [Lightsaber](keyboard/lightsaber/) - Korean custom keyboard
+* [Infinity](keyboard/infinity/) - Massdrop [Infinity keyboard][Infinity]
[GH_macway]: http://geekhack.org/showwiki.php?title=Island:11930
[GH_hhkb]: http://geekhack.org/showwiki.php?title=Island:12047
@@ -72,6 +73,7 @@ You can find some keyboard specific projects under `converter` and `keyboard` di
[PC98]: http://en.wikipedia.org/wiki/NEC_PC-9801
[Sun]: http://en.wikipedia.org/wiki/Sun-3
[IIGS]: http://en.wikipedia.org/wiki/Apple_IIGS
+[Infinity]: https://www.massdrop.com/buy/infinity-keyboard-kit
diff --git a/common/command.c b/common/command.c
index 971ef7f0af..1a507e3a46 100644
--- a/common/command.c
+++ b/common/command.c
@@ -194,6 +194,7 @@ static bool command_common(uint8_t code)
case KC_CAPSLOCK:
if (host_get_driver()) {
host_driver = host_get_driver();
+ clear_keyboard();
host_set_driver(0);
print("Locked.\n");
} else {
diff --git a/common/keycode.h b/common/keycode.h
index 08c3cbf42b..ac4ef00db6 100644
--- a/common/keycode.h
+++ b/common/keycode.h
@@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/*
+/*
* Keycodes based on HID Usage Keyboard/Keypad Page(0x07) plus special codes
* http://www.usb.org/developers/devclass_docs/Hut1_12.pdf
*/
@@ -140,6 +140,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define KC_VOLD KC_AUDIO_VOL_DOWN
#define KC_MNXT KC_MEDIA_NEXT_TRACK
#define KC_MPRV KC_MEDIA_PREV_TRACK
+#define KC_MFFD KC_MEDIA_FAST_FORWARD
+#define KC_MRWD KC_MEDIA_REWIND
#define KC_MSTP KC_MEDIA_STOP
#define KC_MPLY KC_MEDIA_PLAY_PAUSE
#define KC_MSEL KC_MEDIA_SELECT
@@ -390,7 +392,7 @@ enum hid_keyboard_keypad_usage {
KC_RALT,
KC_RGUI,
- /* NOTE: 0xE8-FF are used for internal special purpose */
+ /* NOTE: 0xE8-FF are used for internal special purpose */
};
/* Special keycodes */
@@ -420,7 +422,9 @@ enum internal_special_keycodes {
KC_WWW_FORWARD,
KC_WWW_STOP,
KC_WWW_REFRESH,
- KC_WWW_FAVORITES, /* 0xBA */
+ KC_WWW_FAVORITES,
+ KC_MEDIA_FAST_FORWARD,
+ KC_MEDIA_REWIND, /* 0xBC */
/* Fn key */
KC_FN0 = 0xC0,
diff --git a/common/matrix.h b/common/matrix.h
index 23fef78f74..107ee72653 100644
--- a/common/matrix.h
+++ b/common/matrix.h
@@ -35,6 +35,10 @@ typedef uint32_t matrix_row_t;
#define MATRIX_IS_ON(row, col) (matrix_get_row(row) && (1<<col))
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* number of matrix rows */
uint8_t matrix_rows(void);
/* number of matrix columns */
@@ -48,7 +52,7 @@ bool matrix_is_modified(void) __attribute__ ((deprecated));
/* whether a swtich is on */
bool matrix_is_on(uint8_t row, uint8_t col);
/* matrix state on row */
-matrix_row_t matrix_get_row(uint8_t row);
+matrix_row_t matrix_get_row(uint8_t row);
/* print matrix for debug */
void matrix_print(void);
@@ -57,5 +61,8 @@ void matrix_print(void);
void matrix_power_up(void);
void matrix_power_down(void);
+#ifdef __cplusplus
+}
+#endif
#endif
diff --git a/common/mbed/xprintf.cpp b/common/mbed/xprintf.cpp
index 4342b79f80..3647ece751 100644
--- a/common/mbed/xprintf.cpp
+++ b/common/mbed/xprintf.cpp
@@ -6,6 +6,10 @@
#define STRING_STACK_LIMIT 120
+//TODO
+int xprintf(const char* format, ...) { return 0; }
+
+#if 0
/* mbed Serial */
Serial ser(UART_TX, UART_RX);
@@ -44,3 +48,4 @@ int xprintf(const char* format, ...)
return r;
*/
}
+#endif
diff --git a/common/print.c b/common/print.c
index c13a29f317..ca94e1e5d6 100644
--- a/common/print.c
+++ b/common/print.c
@@ -22,13 +22,14 @@
* THE SOFTWARE.
*/
-#include <avr/io.h>
-#include <avr/pgmspace.h>
+#include <stdint.h>
#include "print.h"
#ifndef NO_PRINT
+#if defined(__AVR__)
+
#define sendchar(c) xputc(c)
@@ -37,4 +38,11 @@ void print_set_sendchar(int8_t (*sendchar_func)(uint8_t))
xdev_out(sendchar_func);
}
+#elif defined(__arm__)
+
+// TODO
+//void print_set_sendchar(int8_t (*sendchar_func)(uint8_t)) { }
+
+#endif
+
#endif
diff --git a/common/report.h b/common/report.h
index 62190469a4..f6c0a315de 100644
--- a/common/report.h
+++ b/common/report.h
@@ -61,6 +61,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* supplement for Bluegiga iWRAP HID(not supported by Windows?) */
#define AL_LOCK 0x019E
#define TRANSPORT_RECORD 0x00B2
+#define TRANSPORT_FAST_FORWARD 0x00B3
#define TRANSPORT_REWIND 0x00B4
#define TRANSPORT_EJECT 0x00B8
#define AC_MINIMIZE 0x0206
@@ -158,6 +159,8 @@ typedef struct {
(key == KC_AUDIO_VOL_DOWN ? AUDIO_VOL_DOWN : \
(key == KC_MEDIA_NEXT_TRACK ? TRANSPORT_NEXT_TRACK : \
(key == KC_MEDIA_PREV_TRACK ? TRANSPORT_PREV_TRACK : \
+ (key == KC_MEDIA_FAST_FORWARD ? TRANSPORT_FAST_FORWARD : \
+ (key == KC_MEDIA_REWIND ? TRANSPORT_REWIND : \
(key == KC_MEDIA_STOP ? TRANSPORT_STOP : \
(key == KC_MEDIA_EJECT ? TRANSPORT_STOP_EJECT : \
(key == KC_MEDIA_PLAY_PAUSE ? TRANSPORT_PLAY_PAUSE : \
@@ -171,7 +174,7 @@ typedef struct {
(key == KC_WWW_FORWARD ? AC_FORWARD : \
(key == KC_WWW_STOP ? AC_STOP : \
(key == KC_WWW_REFRESH ? AC_REFRESH : \
- (key == KC_WWW_FAVORITES ? AC_BOOKMARKS : 0)))))))))))))))))))
+ (key == KC_WWW_FAVORITES ? AC_BOOKMARKS : 0)))))))))))))))))))))
#ifdef __cplusplus
}
diff --git a/converter/ps2_usb/Makefile.mbed b/converter/ps2_usb/Makefile.mbed
index 631f270f75..ff8a0de7a4 100644
--- a/converter/ps2_usb/Makefile.mbed
+++ b/converter/ps2_usb/Makefile.mbed
@@ -39,6 +39,8 @@ LIBRARIES =
MOUSEKEY_ENABLE = yes
+#include $(TMK_DIR)/tool/mbed/mk20d50m.mk
+include $(TMK_DIR)/tool/mbed/lpc11u35_501.mk
include $(TMK_DIR)/tool/mbed/mbed.mk
include $(TMK_DIR)/tool/mbed/common.mk
include $(TMK_DIR)/tool/mbed/gcc.mk
diff --git a/converter/terminal_bluefruit/Makefile b/converter/terminal_bluefruit/Makefile
index 83d68fc252..28b7397bae 100644
--- a/converter/terminal_bluefruit/Makefile
+++ b/converter/terminal_bluefruit/Makefile
@@ -83,21 +83,6 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
PS2_USE_INT = yes # uses external interrupt for falling edge of PS/2 clock pin
#PS2_USE_BUSYWAIT = yes # uses primitive reference code
-ifdef PS2_USE_USART
- SRC += protocol/ps2_usart.c
- OPT_DEFS += -DPS2_USE_USART
-endif
-
-ifdef PS2_USE_INT
- SRC += protocol/ps2.c
- OPT_DEFS += -DPS2_USE_INT
-endif
-
-ifdef PS2_USE_BUSYWAIT
- SRC += protocol/ps2.c
- OPT_DEFS += -DPS2_USE_BUSYWAIT
-endif
-
#---------------- Programming Options --------------------------
PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex
@@ -107,6 +92,7 @@ VPATH += $(TARGET_DIR)
VPATH += $(TOP_DIR)
+include $(TOP_DIR)/protocol.mk
include $(TOP_DIR)/protocol/bluefruit.mk
include $(TOP_DIR)/protocol.mk
include $(TOP_DIR)/common.mk
diff --git a/converter/terminal_usb/Makefile b/converter/terminal_usb/Makefile
index 6154d86826..16df638b94 100644
--- a/converter/terminal_usb/Makefile
+++ b/converter/terminal_usb/Makefile
@@ -82,21 +82,6 @@ PS2_USE_USART = yes # uses hardware USART engine for PS/2 signal receive(recomen
#PS2_USE_INT = yes # uses external interrupt for falling edge of PS/2 clock pin
#PS2_USE_BUSYWAIT = yes # uses primitive reference code
-ifdef PS2_USE_USART
- SRC += protocol/ps2_usart.c
- OPT_DEFS += -DPS2_USE_USART
-endif
-
-ifdef PS2_USE_INT
- SRC += protocol/ps2.c
- OPT_DEFS += -DPS2_USE_INT
-endif
-
-ifdef PS2_USE_BUSYWAIT
- SRC += protocol/ps2.c
- OPT_DEFS += -DPS2_USE_BUSYWAIT
-endif
-
#---------------- Programming Options --------------------------
PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex
diff --git a/converter/usb_usb/Makefile b/converter/usb_usb/Makefile
index 13f77ca9b7..d6867bb002 100644
--- a/converter/usb_usb/Makefile
+++ b/converter/usb_usb/Makefile
@@ -99,16 +99,22 @@ CONSOLE_ENABLE = yes # Console for debug
# Teensy halfKay 512
# Atmel DFU loader 4096
# LUFA bootloader 4096
-#OPT_DEFS += -DBOOTLOADER_SIZE=4096
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
SRC = \
- keymap.c \
+ keymap_common.c \
matrix.c \
led.c \
main.cpp
+ifdef KEYMAP
+ SRC := keymap_$(KEYMAP).c $(SRC)
+else
+ SRC := keymap.c $(SRC)
+endif
+
CONFIG_H = config.h
@@ -120,7 +126,7 @@ VPATH += $(TOP_DIR)
# program Leonardo
-PROGRAM_CMD = avrdude -p$(MCU) -cavr109 -P$(DEV) -b57600 -Uflash:w:$(TARGET).hex
+PROGRAM_CMD = avrdude -p$(MCU) -cavr109 -b57600 -Uflash:w:$(TARGET).hex -P$(DEV)
diff --git a/converter/usb_usb/README b/converter/usb_usb/README
index a489371107..30d5deb1e5 100644
--- a/converter/usb_usb/README
+++ b/converter/usb_usb/README
@@ -7,7 +7,19 @@ Arduino Leonardo
http://arduino.cc/en/Main/ArduinoBoardLeonardo
Circuit@Home USB Host Shield 2.0
- http://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-2-0-for-arduino
+ https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-2-0-for-arduino-assembled/
+
+Buying Arduino Leonardo and USB Host Shield 2.0(from Circuit@home) will be the easiest way, you won't need even soldering iron.
+Arduino's Shield will also work well but I think Sparkfun's needs to be modified.
+
+ http://arduino.cc/en/Main/ArduinoUSBHostShield
+ https://www.sparkfun.com/products/9947
+
+Also Pro Micro 3.3V(not Mini) or Teensy with mini host shield will work with some fixes on signal/power routing.
+ https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-for-arduino-pro-mini
+ https://www.sparkfun.com/products/12587
+ https://www.pjrc.com/teensy/td_libs_USBHostShield.html
+
Build firmware
@@ -19,13 +31,44 @@ Build firmware
$ cd converter/usb_usb
$ make
-You will get usb_usb.hex if you are lucky.
-Program your Leonardo with avrdude(or easy-going Arduino IDE):
+Program converter. Push reset button on Leonardo before run this command. Serial port name(COM17) depends your system. On Linux I got /dev/ttyACM0.
+
+ $ DEV=COM17 make program
+ or
+ $ avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:usb_usb.hex -PCOM17
- $ avrdude -patmega32u4 -cavr109 -PCOM17 -b57600 -Uflash:w:usb_usb.hex
Limitation
----------
Only supports 'HID Boot protocol'.
Not support keyboard LED yet.
+
+Note that the converter can host only USB "boot protocol" keyboard(6KRO) and not NKRO, it is possible to support NKRO keyboard but you will need to write HID report parser for that. Every NKRO keyboard can have different HID report and it is difficult to support all kind of NKRO keyboards in the market.
+
+
+
+Update
+------
+2014/12/11 Added Hub support(confirmed with HHKB pro2)
+
+
+
+Resource
+--------
+USB Host Sheild 2.0
+ https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-2-0-for-arduino
+ https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-for-arduino-pro-mini
+USB Host Sheild 2.0 source
+ https://github.com/felis/USB_Host_Shield_2.0
+Arduino USB Host Shield(with bootst converter)
+ http://arduino.cc/en/Main/ArduinoUSBHostShield
+Arduino source
+ https://github.com/arduino/Arduino/hardware/arduino/{cores,variants}
+Initial release of TMK USB-USB converter
+ https://geekhack.org/index.php?topic=33057.msg653549#msg653549
+ http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841-30.html#p74854
+Arduino-based hardware keyboard remapper - Colemak forum
+ http://forum.colemak.com/viewtopic.php?id=1561
+Teensy + Host Shield
+ http://www.pjrc.com/teensy/td_libs_USBHostShield.html
diff --git a/converter/usb_usb/config.h b/converter/usb_usb/config.h
index d614973f7e..c992456763 100644
--- a/converter/usb_usb/config.h
+++ b/converter/usb_usb/config.h
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define VENDOR_ID 0xFEED
-#define PRODUCT_ID 0xCAFE
+#define PRODUCT_ID 0x005B
#define DEVICE_VER 0x0814
#define MANUFACTURER t.m.k.
#define PRODUCT USB to USB keyboard converter
@@ -33,8 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROWS 32
#define MATRIX_COLS 8
-#define USE_LEGACY_KEYMAP
-
/* key combination for command */
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
diff --git a/converter/usb_usb/keymap.c b/converter/usb_usb/keymap.c
index ff166fcf1f..c14a8aa553 100644
--- a/converter/usb_usb/keymap.c
+++ b/converter/usb_usb/keymap.c
@@ -15,62 +15,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <avr/pgmspace.h>
-#include "keycode.h"
-#include "util.h"
-#include "keymap.h"
+#include "keymap_common.h"
-#define KEYMAP( \
- K29,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, \
- K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K2A, K49,K4A,K4B, K53,K54,K55,K56, \
- K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30,K31, K4C,K4D,K4E, K5F,K60,K61, \
- K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, K28, K5C,K5D,K5E,K57, \
- KE1,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, KE5, K52, K59,K5A,K5B, \
- KE0,KE3,KE2, K2C, KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63,K58 \
-) { \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, /* 00-07 */ \
- { KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_##K0F }, /* 08-0F */ \
- { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17 }, /* 10-17 */ \
- { KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E, KC_##K1F }, /* 18-1F */ \
- { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, /* 20-27 */ \
- { KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_##K2F }, /* 28-2F */ \
- { KC_##K30, KC_##K31, KC_NO, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, /* 30-37 */ \
- { KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F }, /* 38-3F */ \
- { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, /* 40-47 */ \
- { KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F }, /* 48-4F */ \
- { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, /* 50-57 */ \
- { KC_##K58, KC_##K59, KC_##K5A, KC_##K5B, KC_##K5C, KC_##K5D, KC_##K5E, KC_##K5F }, /* 58-5F */ \
- { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_NO, KC_##K65, KC_NO, KC_NO }, /* 60-67 */ \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 68-6F */ \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 70-77 */ \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 78-7F */ \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 80-87 */ \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 88-8F */ \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 90-97 */ \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 98-9F */ \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* A0-A7 */ \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* A8-AF */ \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* B0-B7 */ \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* B8-BF */ \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* C0-C7 */ \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* C8-CF */ \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* D0-D7 */ \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* D8-DF */ \
- { KC_##KE0, KC_##KE1, KC_##KE2, KC_##KE3, KC_##KE4, KC_##KE5, KC_##KE6, KC_##KE7 }, /* E0-E7 */ \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* E8-EF */ \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F0-F7 */ \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F8-FF */ \
-}
-
-
-// Layers to switch by holding Fn key(0-7)
-static const uint8_t PROGMEM fn_layer[] = { 5, 6, 5, 0, 0, 0, 0, 0 };
-
-// Codes to register by clicking Fn key(0-7)
-static const uint8_t PROGMEM fn_keycode[] = { KC_SCLN, KC_SLSH, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO };
-
-static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: default
* ,---. ,---------------. ,---------------. ,---------------. ,-----------. ,-----------.
* |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |Pwr|Slp|Wak|
@@ -86,16 +34,14 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |-----------------------------------------------------------| ,-----------. |-----------|Ent|
* |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl| |Lef|Dow|Rig| | 0| .| |
* `-----------------------------------------------------------' `-----------' `---------------'
- * ; = Fn0(to Layer 5)
- * / = Fn1(to Layer 6)
*/
KEYMAP(
ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS,
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS,
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9,
- FN2, A, S, D, F, G, H, J, K, L, FN0, QUOT, ENT, P4, P5, P6, PPLS,
- LSFT,Z, X, C, V, B, N, M, COMM,DOT, FN1, RSFT, UP, P1, P2, P3,
- LCTL,LGUI,LALT, SPC, RALT,FN2, FN2, GRV, LEFT,DOWN,RGHT, P0, PDOT,PENT
+ CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, PPLS,
+ LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3,
+ LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, GRV, LEFT,DOWN,RGHT, P0, PDOT,PENT
),
/* 1: plain Qwerty without layer switching
@@ -185,67 +131,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LSFT,Z, X, M, C, V, K, L, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3,
LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT
),
-
- /* 5: Mouse keys
- * ,-----------------------------------------------------------.
- * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Backspa|
- * |-----------------------------------------------------------|
- * |Tab |MwL|MwU|McU|WwU|WwR|MwL|MwD|MwU|MwR| | | | \|
- * |-----------------------------------------------------------|
- * |CapsLo| |McL|McD|McR| |McL|McD|McU|McR|Fn0| |Return |
- * |-----------------------------------------------------------|
- * |Shift |VoD|VoU|Mut|Mb2|Mb3|Mb2|Mb1|VoD|VoU|Mut|Shift |
- * |-----------------------------------------------------------|
- * |Ctrl |Gui |Alt | Mb1 |Alt |Gui |Menu|Ctrl|
- * `-----------------------------------------------------------'
- * Mc = mouse cursor, Mw = mouse wheel, Mb = mouse button
- * Vo = Volume, Mut = Mute
- */
- KEYMAP(
- ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS,
- GRV, F1, F2, F3, F4, F5, F6, F7, F8, F8, F10, F11, F12, DEL, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS,
- CAPS,NO, NO, NO, NO, NO, WH_L,WH_D,WH_U,WH_R,PSCR,SLCK,PAUS,INS, DEL, END, PGDN, P7, P8, P9,
- FN2, VOLD,VOLU,MUTE,NO, NO, MS_L,MS_D,MS_U,MS_R,FN0, NO, ENT, P4, P5, P6, PPLS,
- LSFT,NO, NO, NO, NO, BTN3,BTN2,BTN1,NO, NO, NO, RSFT, UP, P1, P2, P3,
- LCTL,LGUI,LALT, BTN1, RALT,FN2, FN2, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT
- ),
-
- /* 6: Cursor keys
- * ,-----------------------------------------------------------.
- * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Backspa|
- * |-----------------------------------------------------------|
- * |Tab |Hom|PgU| Up|PgU|End|Hom|PgD|PgU|End| | | | \|
- * |-----------------------------------------------------------|
- * |CapsLo| |Lef|Dow|Rig| |Lef|Dow| Up|Rig| | |Return |
- * |-----------------------------------------------------------|
- * |Shift | | | | | |Hom|PgD|PgU|End|Fn1|Shift |
- * |-----------------------------------------------------------|
- * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl|
- * `---------------------------