فهرست منبع

Merge remote-tracking branch 'refs/remotes/jackhumbert/master'

di0ib 8 سال پیش
والد
کامیت
a36b2a0756
100فایلهای تغییر یافته به همراه3142 افزوده شده و 1232 حذف شده
  1. 2 0
      .gitignore
  2. 1 1
      .travis.yml
  3. 28 0
      Dockerfile
  4. 20 12
      Makefile
  5. 1 1
      Vagrantfile
  6. 1 1
      doc/TMK_README.md
  7. 2 2
      doc/VAGRANT_GUIDE.md
  8. 96 0
      doc/basic_how_keyboards_work.md
  9. 4 0
      keyboards/alps64/readme.md
  10. 5 5
      keyboards/atreus/atreus.h
  11. 0 16
      keyboards/clueboard/clueboard.c
  12. 4 0
      keyboards/clueboard/readme.md
  13. 16 0
      keyboards/clueboard/rev1/rev1.c
  14. 16 0
      keyboards/clueboard/rev2/rev2.c
  15. 1 1
      keyboards/clueboard/rev2/rev2.h
  16. 4 0
      keyboards/cluepad/readme.md
  17. 34 0
      keyboards/ergodox/Makefile
  18. 36 0
      keyboards/ergodox/config.h
  19. 0 0
      keyboards/ergodox/ergodox.c
  20. 10 0
      keyboards/ergodox/ergodox.h
  21. 0 0
      keyboards/ergodox/ez/190hotfix.sh
  22. 1 11
      keyboards/ergodox/ez/Makefile
  23. 7 26
      keyboards/ergodox/ez/config.h
  24. 1 1
      keyboards/ergodox/ez/ez.c
  25. 0 0
      keyboards/ergodox/ez/ez.h
  26. 0 0
      keyboards/ergodox/ez/i2cmaster.h
  27. 1 1
      keyboards/ergodox/ez/matrix.c
  28. 0 0
      keyboards/ergodox/ez/twimaster.c
  29. 0 0
      keyboards/ergodox/ez/util/compile_keymap.py
  30. 0 0
      keyboards/ergodox/ez/util/readme.md
  31. 0 0
      keyboards/ergodox/infinity/MEMO.txt
  32. 8 16
      keyboards/ergodox/infinity/Makefile
  33. 0 0
      keyboards/ergodox/infinity/bootloader_defs.h
  34. 0 0
      keyboards/ergodox/infinity/chconf.h
  35. 10 15
      keyboards/ergodox/infinity/config.h
  36. 0 0
      keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/board_IS31FL3731C.h
  37. 0 0
      keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/driver.mk
  38. 0 0
      keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/gdisp_IS31FL3731C.c
  39. 0 0
      keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/gdisp_lld_config.h
  40. 0 0
      keyboards/ergodox/infinity/drivers/gdisp/emulator_lcd/driver.mk
  41. 0 0
      keyboards/ergodox/infinity/drivers/gdisp/emulator_lcd/emulator_lcd.c
  42. 0 0
      keyboards/ergodox/infinity/drivers/gdisp/emulator_led/driver.mk
  43. 0 0
      keyboards/ergodox/infinity/drivers/gdisp/emulator_led/emulator_led.c
  44. 0 0
      keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/board_ST7565.h
  45. 0 0
      keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/driver.mk
  46. 0 0
      keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/gdisp_lld_ST7565.c
  47. 0 0
      keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/gdisp_lld_config.h
  48. 0 0
      keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/st7565.h
  49. 0 0
      keyboards/ergodox/infinity/gfxconf.h
  50. 0 0
      keyboards/ergodox/infinity/halconf.h
  51. 58 2
      keyboards/ergodox/infinity/infinity.c
  52. 110 0
      keyboards/ergodox/infinity/infinity.h
  53. 0 0
      keyboards/ergodox/infinity/led.c
  54. 3 0
      keyboards/ergodox/infinity/matrix.c
  55. 0 0
      keyboards/ergodox/infinity/mcuconf.h
  56. 0 0
      keyboards/ergodox/keymaps/ab/Makefile
  57. 0 0
      keyboards/ergodox/keymaps/ab/keyboard-layout.json
  58. 0 0
      keyboards/ergodox/keymaps/ab/keyboard-layout.png
  59. 1 1
      keyboards/ergodox/keymaps/ab/keymap.c
  60. 0 0
      keyboards/ergodox/keymaps/ab/readme.md
  61. 1 1
      keyboards/ergodox/keymaps/adnw_k_o_y/keymap.c
  62. 0 0
      keyboards/ergodox/keymaps/adnw_k_o_y/readme.md
  63. 1 1
      keyboards/ergodox/keymaps/alexjj/keymap.c
  64. 0 0
      keyboards/ergodox/keymaps/alexjj/readme.md
  65. 0 0
      keyboards/ergodox/keymaps/alexjj/rl-layout.jpg
  66. 0 0
      keyboards/ergodox/keymaps/algernon/COPYING
  67. 9 0
      keyboards/ergodox/keymaps/algernon/Makefile
  68. 0 0
      keyboards/ergodox/keymaps/algernon/config.h
  69. BIN
      keyboards/ergodox/keymaps/algernon/images/adore-layer.png
  70. BIN
      keyboards/ergodox/keymaps/algernon/images/base-layer.png
  71. BIN
      keyboards/ergodox/keymaps/algernon/images/heatmap.png
  72. 0 0
      keyboards/ergodox/keymaps/algernon/images/hun-layer.png
  73. 0 0
      keyboards/ergodox/keymaps/algernon/images/nav-n-media-layer.png
  74. 0 0
      keyboards/ergodox/keymaps/algernon/images/one-handed-layer.png
  75. 0 0
      keyboards/ergodox/keymaps/algernon/images/steno-layer.png
  76. 1218 1104
      keyboards/ergodox/keymaps/algernon/keymap.c
  77. 198 0
      keyboards/ergodox/keymaps/algernon/readme.md
  78. 533 0
      keyboards/ergodox/keymaps/algernon/tools/heatmap-adore-layout.json
  79. 533 0
      keyboards/ergodox/keymaps/algernon/tools/heatmap-base-layout.json
  80. 145 0
      keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py
  81. 0 0
      keyboards/ergodox/keymaps/algernon/tools/max-focused
  82. 1 1
      keyboards/ergodox/keymaps/andrew_osx/keymap.c
  83. 0 0
      keyboards/ergodox/keymaps/bepo/bepo.png
  84. 1 1
      keyboards/ergodox/keymaps/bepo/keymap.c
  85. 0 0
      keyboards/ergodox/keymaps/bepo/readme.md
  86. 2 0
      keyboards/ergodox/keymaps/coderkun_neo2/Makefile
  87. 14 7
      keyboards/ergodox/keymaps/coderkun_neo2/keymap.c
  88. 0 0
      keyboards/ergodox/keymaps/coderkun_neo2/readme.md
  89. 1 1
      keyboards/ergodox/keymaps/colemak/keymap.c
  90. 0 0
      keyboards/ergodox/keymaps/colemak/readme.md
  91. 0 0
      keyboards/ergodox/keymaps/colemak_osx_pc_no/keyboard-layout.png
  92. 2 2
      keyboards/ergodox/keymaps/colemak_osx_pc_no/keymap.c
  93. 0 0
      keyboards/ergodox/keymaps/colemak_osx_pc_no/readme.md
  94. 0 0
      keyboards/ergodox/keymaps/csharp_dev/csharp_dev.png
  95. 0 0
      keyboards/ergodox/keymaps/csharp_dev/csharp_dev_legend.png
  96. 1 1
      keyboards/ergodox/keymaps/csharp_dev/keymap.c
  97. 0 0
      keyboards/ergodox/keymaps/csharp_dev/readme.md
  98. 1 1
      keyboards/ergodox/keymaps/dave/keymap.c
  99. 0 0
      keyboards/ergodox/keymaps/dave/readme.md
  100. 0 0
      keyboards/ergodox/keymaps/default/default.png

+ 2 - 0
.gitignore

@@ -17,6 +17,7 @@ build/
 .build/
 *.bak
 .vagrant/
+quantum/version.h
 .idea/
 CMakeLists.txt
 .DS_STORE
@@ -26,3 +27,4 @@ CMakeLists.txt
 .project
 .settings/
 .idea
+.browse.VC.db*

+ 1 - 1
.travis.yml

@@ -10,7 +10,7 @@ env:
   global:
   - secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM=
 script:
-- make all-keyboards-quick AUTOGEN=true
+- make all-keyboards AUTOGEN=true
 addons:
   apt:
     packages:

+ 28 - 0
Dockerfile

@@ -0,0 +1,28 @@
+FROM debian:jessie
+MAINTAINER Erik Dasque <erik@frenchguys.com>
+
+RUN apt-get update
+RUN apt-get install --no-install-recommends -y build-essential \
+    gcc \
+    unzip \
+    wget \
+    zip \
+    gcc-avr \
+    binutils-avr \
+    avr-libc \
+    dfu-programmer \
+    dfu-util \
+    gcc-arm-none-eabi \
+    binutils-arm-none-eabi \
+    libnewlib-arm-none-eabi \
+    git
+
+RUN apt-get clean
+RUN rm -rf /var/lib/apt/lists/*
+
+ENV keyboard=ergodox
+ENV keymap=default
+
+VOLUME /qmk
+WORKDIR /qmk
+CMD make clean ; make keyboard=${keyboard} keymap=${keymap}

+ 20 - 12
Makefile

@@ -5,8 +5,9 @@ endif
 .DEFAULT_GOAL := all
 
 space := $(subst ,, )
-starting_makefile := $(subst $(space),_SPACE_,$(abspath $(firstword $(MAKEFILE_LIST))))
-mkfile_path := $(subst $(space),_SPACE_,$(abspath $(lastword $(MAKEFILE_LIST))))
+ESCAPED_ABS_PATH = $(subst $(space),_SPACE_,$(abspath $1))
+starting_makefile := $(call ESCAPED_ABS_PATH,$(firstword $(MAKEFILE_LIST)))
+mkfile_path := $(call ESCAPED_ABS_PATH,$(lastword $(MAKEFILE_LIST))))
 abs_tmk_root := $(patsubst %/,%,$(dir $(mkfile_path)))
 
 ifneq (,$(findstring /keyboards/,$(starting_makefile)))
@@ -83,10 +84,8 @@ endif
 
 ifneq ("$(wildcard $(KEYBOARD_PATH)/$(KEYBOARD).c)","")
 	KEYBOARD_FILE = keyboards/$(KEYBOARD)/$(KEYBOARD).c
-	ifndef ARCH
-		ifneq ("$(wildcard $(KEYBOARD_PATH)/Makefile)","")
-			include $(KEYBOARD_PATH)/Makefile
-		endif
+	ifneq ($(call ESCAPED_ABS_PATH,$(KEYBOARD_PATH)/Makefile),$(starting_makefile))
+		-include $(KEYBOARD_PATH)/Makefile
 	endif
 else 
 $(error "$(KEYBOARD_PATH)/$(KEYBOARD).c" does not exist)
@@ -101,7 +100,9 @@ ifdef SUBPROJECT
 	ifneq ("$(wildcard $(SUBPROJECT_PATH)/$(SUBPROJECT).c)","")
 		OPT_DEFS += -DSUBPROJECT_$(SUBPROJECT)
 		SUBPROJECT_FILE = keyboards/$(KEYBOARD)/$(SUBPROJECT)/$(SUBPROJECT).c
-		-include $(SUBPROJECT_PATH)/Makefile
+		ifneq ($(call ESCAPED_ABS_PATH,$(SUBPROJECT_PATH)/Makefile),$(starting_makefile))
+			-include $(SUBPROJECT_PATH)/Makefile
+		endif
 	else 
 $(error "$(SUBPROJECT_PATH)/$(SUBPROJECT).c" does not exist)
 	endif
@@ -119,14 +120,18 @@ endif
 KEYMAP_PATH = $(KEYBOARD_PATH)/keymaps/$(KEYMAP)
 ifneq ("$(wildcard $(KEYMAP_PATH)/keymap.c)","")
 	KEYMAP_FILE = keyboards/$(KEYBOARD)/keymaps/$(KEYMAP)/keymap.c
-	-include $(KEYMAP_PATH)/Makefile
+	ifneq ($(call ESCAPED_ABS_PATH,$(KEYMAP_PATH)/Makefile),$(starting_makefile))
+		-include $(KEYMAP_PATH)/Makefile
+	endif
 else 
 	ifeq ("$(wildcard $(SUBPROJECT_PATH)/keymaps/$(KEYMAP)/keymap.c)","")
 $(error "$(KEYMAP_PATH)/keymap.c" does not exist)
 	else
 		KEYMAP_PATH = $(SUBPROJECT_PATH)/keymaps/$(KEYMAP)
 		KEYMAP_FILE = keyboards/$(KEYBOARD)/$(SUBPROJECT)/keymaps/$(KEYMAP)/keymap.c
-		-include $(KEYMAP_PATH)/Makefile
+		ifneq ($(call ESCAPED_ABS_PATH,$(KEYMAP_PATH)/Makefile),$(starting_makefile))
+			-include $(KEYMAP_PATH)/Makefile
+		endif
 	endif
 endif
 
@@ -135,7 +140,8 @@ ifdef SUBPROJECT
 else
 	TARGET ?= $(KEYBOARD)_$(KEYMAP)
 endif
-BUILD_DIR = .build
+
+BUILD_DIR = $(TOP_DIR)/.build
 
 # Object files directory
 #     To put object files in current directory, use a dot (.), do NOT make
@@ -181,7 +187,7 @@ endif
 
 ifeq ($(strip $(MIDI_ENABLE)), yes)
     OPT_DEFS += -DMIDI_ENABLE
-	SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
+	SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
 endif
 
 ifeq ($(strip $(AUDIO_ENABLE)), yes)
@@ -265,4 +271,6 @@ include $(TMK_PATH)/rules.mk
 GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
 BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S")
 OPT_DEFS += -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\"
-OPT_DEFS += -DQMK_VERSION=\"$(GIT_VERSION)\" -DQMK_BUILDDATE=\"$(BUILD_DATE)\"
+
+$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(QUANTUM_PATH)/version.h)
+$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(QUANTUM_PATH)/version.h)

+ 1 - 1
Vagrantfile

@@ -91,7 +91,7 @@ Vagrant.configure(2) do |config|
 
   Or you can copy and paste the example line below.
 
-  cd /vagrant; cd keyboards; cd ergodox_ez; make clean; make
+  cd /vagrant; cd keyboards; cd ergodox; make clean; make
 
 
   EOT

+ 1 - 1
doc/TMK_README.md

@@ -34,7 +34,7 @@ You can find some keyboard specific projects under `converter` and `keyboard` di
 * [atomic](keyboards/atomic/)                - [Atomic] Ortholinear 60% keyboard
 
 ### Ergodox EZ
-* [ergodox_ez](keyboards/ergodox_ez)         - [Ergodox_EZ] Assembled split keyboard
+* [ergodox_ez](keyboards/ergodox/ez)         - [Ergodox_EZ] Assembled split keyboard
 
 ## Other projects
 

+ 2 - 2
doc/VAGRANT_GUIDE.md

@@ -20,7 +20,7 @@ See [/doc/keymap.md](/doc/keymap.md).
 
 ## Flashing the firmware
 
-The "easy" way to flash the firmware is using a tool from your host OS like the Teensy programming app. [ErgoDox EZ](/keyboards/ergodox_ez/readme.md) gives a great example.
+The "easy" way to flash the firmware is using a tool from your host OS like the Teensy programming app. [ErgoDox EZ](/keyboards/ergodox/readme.md) gives a great example.
 
 If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version.
-	
+	

+ 96 - 0
doc/basic_how_keyboards_work.md

@@ -0,0 +1,96 @@
+# How keys are registered, and interpreted by computers
+
+In this file, you can will learn the concepts of how keyboards work over USB,
+and you'll be able to better understand what you can expect from changing your
+firmware directly.
+
+## Schematic view
+
+Whenever you type on 1 particular key, here is the chain of actions taking
+place:
+
+``` text
++------+         +-----+       +----------+      +----------+     +----+
+| User |-------->| Key |------>| Firmware |----->| USB wire |---->| OS |
++------+         +-----+       +----------+      +----------+     |----+
+```
+
+This scheme is a very simple view of what's going on, and more details follow
+in the next sections.
+
+## 1. You Press a Key
+
+Whenever you press a key, the firmware of your keyboard can register this event.
+It can register when the key is pressed, held and released.
+
+This usually happens with a [periodic scan of key presses with a frequency around 100 hz](https://github.com/benblazak/ergodox-firmware/blob/master/references.md#typical-keyboard-information).
+This speed often is limited by the mechanical key response time, the protocol
+to transfer those key presses (here USB HID), and by the software it is used in.
+
+## 2. What the Firmware Sends
+
+The [HID specification](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf)
+tells what a keyboard can actually send through USB to have a chance to be
+properly recognised. This includes a pre-defined list of keycodes which are
+simple numbers from `0x00` to `0xE7`. The firmware assigns a keycode to each
+key of the keyboard.
+
+The firmware does not send actually letters or characters, but only keycodes.
+Thus, by modifying the firmware, you only can modify what keycode is sent over
+USB for a given key.
+
+## 3. What the Operating System Does
+
+Once the keycode reaches the operating system, a piece of software has to have
+it match an actual character thanks to a keyboard layout. For example, if your
+layout is set to QWERTY, a sample of the matching table is as follow:
+
+``` text
+| keycode | character |
+|---------+-----------|
+|    0x04 | a/A       |
+|    0x05 | b/B       |
+|    0x06 | c/C       |
+|     ... | ...       |
+|    0x1C | y/Y       |
+|    0x1D | z/Z       |
+|     ... | ...       |
+|---------+-----------|
+```
+
+## Back to the firmware
+
+As the layout is generally fixed (unless you create your own), the firmware can
+actually call a keycode by its layout name directly to ease things for you.
+
+This is exactly what is done here with `KC_A` actually representing `0x04` in
+QWERTY. The full list can be found in `keycode.txt`.
+
+## List of Characters You Can Send
+
+Putting aside shortcuts, having a limited set of keycodes mapped to a limited
+layout means that **the list of characters you can assign to a given key only
+is the ones present in the layout**.
+
+For example, this means that if you have a QWERTY US layout, and you want to
+assign 1 key to produce `€` (euro currency symbol), you are unable to do so,
+because the QWERTY US layout does not have such mapping. You could fix that by
+using a QWERTY UK layout, or a QWERTY US International.
+
+You may wonder why a keyboard layout containing all of Unicode is not devised
+then? The limited number of keycode available through USB simply disallow such
+a thing.
+
+## How to (Maybe) Enter Unicode Characters
+
+You can have the firmware send *sequences of keys* to use the [software Unicode
+Input
+Method](https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input) of
+the target operating system, thus effectively entering characters independently
+of the layout defined in the OS.
+
+Yet, it does come with multiple disadvantages:
+
+ - Tied to a specific OS a a time (need recompilation when changing OS);
+ - Within a given OS, does not work in all software;
+ - Limited to a subset of Unicode on some systems.

+ 4 - 0
keyboards/alps64/readme.md

@@ -0,0 +1,4 @@
+Alps64 keyboard firmware
+======================
+
+TODO: to be updated.

+ 5 - 5
keyboards/atreus/atreus.h

@@ -10,16 +10,16 @@
 // The first section contains all of the arguements
 // The second converts the arguments into a two-dimensional array
 #define KEYMAP( \
-  k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \
-  k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \
-  k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, \
-  k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a \
+  k00, k01, k02, k03, k04,           k05, k06, k07, k08, k09, \
+  k10, k11, k12, k13, k14,           k15, k16, k17, k18, k19, \
+  k20, k21, k22, k23, k24,           k25, k26, k27, k28, k29, \
+  k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
 ) \
 { \
 	{ k00, k01, k02, k03, k04, KC_NO, k05, k06, k07, k08, k09 }, \
 	{ k10, k11, k12, k13, k14, KC_NO, k15, k16, k17, k18, k19 }, \
 	{ k20, k21, k22, k23, k24, k35,   k25, k26, k27, k28, k29 }, \
-	{ k2a, k30, k31, k32, k33, k34,   k36, k37, k38, k39, k3a } \
+	{ k30, k31, k32, k33, k34, k36,   k37, k38, k39, k3a, k3b } \
 }
 
 #endif

+ 0 - 16
keyboards/clueboard/clueboard.c

@@ -1,17 +1 @@
 #include "clueboard.h"
-
-void led_init_ports() {
-    // * Set our LED pins as output
-    DDRB |= (1<<4);
-}
-
-void led_set_kb(uint8_t usb_led) {
-    DDRF |= (1<<0);
-    if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
-        // Turn capslock on
-        PORTF |= (1<<0);
-    } else {
-        // Turn capslock off
-        PORTF &= ~(1<<0);
-    }
-}

+ 4 - 0
keyboards/clueboard/readme.md

@@ -0,0 +1,4 @@
+Clueboard keyboard firmware
+======================
+
+TODO: to be updated.

+ 16 - 0
keyboards/clueboard/rev1/rev1.c

@@ -1 +1,17 @@
 #include "rev1.h"
+
+void led_init_ports() {
+    // * Set our LED pins as output
+    DDRF |= (1<<0);
+}
+
+void led_set_kb(uint8_t usb_led) {
+    DDRF |= (1<<0);
+    if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+        // Turn capslock on
+        PORTF |= (1<<0);
+    } else {
+        // Turn capslock off
+        PORTF &= ~(1<<0);
+    }
+}

+ 16 - 0
keyboards/clueboard/rev2/rev2.c

@@ -45,3 +45,19 @@ void backlight_set(uint8_t level) {
         PORTD &= ~(1<<4); // Arrows
     }
 }
+
+void led_init_ports() {
+    // * Set our LED pins as output
+    DDRB |= (1<<4);
+}
+
+void led_set_kb(uint8_t usb_led) {
+    DDRB |= (1<<4);
+    if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+        // Turn capslock on
+        PORTB |= (1<<4);
+    } else {
+        // Turn capslock off
+        PORTB &= ~(1<<4);
+    }
+}

+ 1 - 1
keyboards/clueboard/rev2/rev2.h

@@ -13,7 +13,7 @@
  * |------------------------------------------------------------.
  * |  30| 31| 32| 33| 34| 35| 36| 37| 80| 81| 82| 83| 84|  85|86|
  * |------------------------------------------------------------------.
- * |  40| 41|  42|  43|   45|       46|   90|  91|  92| 93| 94| 95| 96|
+ * |  40| 41|  42|  43|   45|       46|   90|  92|  93| 94| 95| 96| 97|
  * `------------------------------------------------------------------'
  * ,-----------------------------------------------------------.  ,---.
  * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Yen| BS|  |Ins|

+ 4 - 0
keyboards/cluepad/readme.md

@@ -0,0 +1,4 @@
+Cluepad number pad firmware
+======================
+
+TODO: to be updated.

+ 34 - 0
keyboards/ergodox/Makefile

@@ -0,0 +1,34 @@
+#----------------------------------------------------------------------------
+# On command line:
+#
+# make = Make software.
+#
+# make clean = Clean out built project files.
+#
+# That's pretty much all you need. To compile, always go make clean, 
+# followed by make.
+#
+# For advanced users only:
+# make teensy = Download the hex file to the device, using teensy_loader_cli.
+#               (must have teensy_loader_cli installed).
+#
+#----------------------------------------------------------------------------
+SUBPROJECT_DEFAULT = ez
+
+# Build Options
+#   comment out to disable the options.
+#
+BOOTMAGIC_ENABLE ?= no  # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE  ?= yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE  ?= yes # Audio control and System control(+450)
+CONSOLE_ENABLE   ?= no  # Console for debug(+400)
+COMMAND_ENABLE   ?= yes # Commands for debug and configuration
+CUSTOM_MATRIX    ?= yes # Custom matrix file for the ErgoDox EZ
+SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
+NKRO_ENABLE      ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+MIDI_ENABLE      ?= no  # MIDI controls
+UNICODE_ENABLE   ?= yes # Unicode
+
+ifndef QUANTUM_DIR
+	include ../../Makefile
+endif

+ 36 - 0
keyboards/ergodox/config.h

@@ -0,0 +1,36 @@
+#ifndef KEYBOARDS_ERGODOX_CONFIG_H_
+#define KEYBOARDS_ERGODOX_CONFIG_H_
+
+#define MOUSEKEY_DELAY          100
+#define MOUSEKEY_INTERVAL       20
+#define MOUSEKEY_MAX_SPEED      3
+#define MOUSEKEY_TIME_TO_MAX    10
+
+#define TAPPING_TOGGLE  1
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+#define TAPPING_TERM    200
+#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+    keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \
+    keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
+)
+
+#ifdef SUBPROJECT_ez
+    #include "ez/config.h"
+#endif
+#ifdef SUBPROJECT_infinity
+    #include "infinity/config.h"
+#endif
+
+
+#endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */

+ 0 - 0
keyboards/ergodox/ergodox.c


+ 10 - 0
keyboards/ergodox/ergodox.h

@@ -0,0 +1,10 @@
+#ifndef KEYBOARDS_ERGODOX_ERGODOX_H_
+#define KEYBOARDS_ERGODOX_ERGODOX_H_
+#ifdef SUBPROJECT_ez
+    #include "ez.h"
+#endif
+#ifdef SUBPROJECT_infinity
+    #include "infinity.h"
+#endif
+
+#endif /* KEYBOARDS_ERGODOX_ERGODOX_H_ */

+ 0 - 0
keyboards/ergodox_ez/190hotfix.sh → keyboards/ergodox/ez/190hotfix.sh


+ 1 - 11
keyboards/ergodox_ez/Makefile → keyboards/ergodox/ez/Makefile

@@ -70,17 +70,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=512
 # Build Options
 #   comment out to disable the options.
 #
-BOOTMAGIC_ENABLE ?= no  # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE  ?= yes # Mouse keys(+4700)
-EXTRAKEY_ENABLE  ?= yes # Audio control and System control(+450)
-CONSOLE_ENABLE   ?= no  # Console for debug(+400)
-COMMAND_ENABLE   ?= yes # Commands for debug and configuration
-CUSTOM_MATRIX    ?= yes # Custom matrix file for the ErgoDox EZ
-SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
-NKRO_ENABLE      ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-MIDI_ENABLE      ?= no  # MIDI controls
-UNICODE_ENABLE   ?= yes # Unicode
 
 ifndef QUANTUM_DIR
-	include ../../Makefile
+	include ../../../Makefile
 endif

+ 7 - 26
keyboards/ergodox_ez/config.h → keyboards/ergodox/ez/config.h

@@ -16,10 +16,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/>.
 */
 
-#ifndef CONFIG_H
-#define CONFIG_H
+#ifndef ERGODOX_EZ_CONFIG_H
+#define ERGODOX_EZ_CONFIG_H
 
-#include "config_common.h"
+#include "../config.h"
 
 /* USB Device descriptor parameter */
 #define VENDOR_ID       0xFEED
@@ -33,34 +33,15 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define MATRIX_ROWS 14
 #define MATRIX_COLS 6
 
-#define MOUSEKEY_DELAY          100
-#define MOUSEKEY_INTERVAL       20
-#define MOUSEKEY_MAX_SPEED      3
-#define MOUSEKEY_TIME_TO_MAX    10
-
-#define TAPPING_TOGGLE  1
-
-/* define if matrix has ghost */
-//#define MATRIX_HAS_GHOST
-
 /* number of backlight levels */
 #define BACKLIGHT_LEVELS 3
 
+#define LED_BRIGHTNESS_LO       15
+#define LED_BRIGHTNESS_HI       255
+
+
 /* Set 0 if debouncing isn't needed */
 #define DEBOUNCE    5
-#define TAPPING_TERM    200
-#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
-
-/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
-#define LOCKING_SUPPORT_ENABLE
-/* Locking resynchronize hack */
-#define LOCKING_RESYNC_ENABLE
-
-/* key combination for command */
-#define IS_COMMAND() ( \
-    keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \
-    keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
-)
 
 /*
  * Feature disable options

+ 1 - 1
keyboards/ergodox_ez/ergodox_ez.c → keyboards/ergodox/ez/ez.c

@@ -1,4 +1,4 @@
-#include "ergodox_ez.h"
+#include "ez.h"
 #include "i2cmaster.h"
 
 bool i2c_initialized = 0;

+ 0 - 0
keyboards/ergodox_ez/ergodox_ez.h → keyboards/ergodox/ez/ez.h


+ 0 - 0
keyboards/ergodox_ez/i2cmaster.h → keyboards/ergodox/ez/i2cmaster.h


+ 1 - 1
keyboards/ergodox_ez/matrix.c → keyboards/ergodox/ez/matrix.c

@@ -33,7 +33,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "debug.h"
 #include "util.h"
 #include "matrix.h"
-#include "ergodox_ez.h"
+#include "ez.h"
 #include "i2cmaster.h"
 #ifdef DEBUG_MATRIX_SCAN_RATE
 #include  "timer.h"

+ 0 - 0
keyboards/ergodox_ez/twimaster.c → keyboards/ergodox/ez/twimaster.c


+ 0 - 0
keyboards/ergodox_ez/keymaps/german-manuneo/compile_keymap.py → keyboards/ergodox/ez/util/compile_keymap.py


+ 0 - 0
keyboards/ergodox_ez/util/readme.md → keyboards/ergodox/ez/util/readme.md


+ 0 - 0
keyboards/infinity_ergodox/MEMO.txt → keyboards/ergodox/infinity/MEMO.txt


+ 8 - 16
keyboards/infinity_ergodox/Makefile → keyboards/ergodox/infinity/Makefile

@@ -52,34 +52,26 @@ ARMV = 7
 # Vector table for application
 # 0x00000000-0x00001000 area is occupied by bootlaoder.*/
 # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
-OPT_DEFS = -DCORTEX_VTOR_INIT=0x00002000
+OPT_DEFS += -DCORTEX_VTOR_INIT=0x00002000
 
 # Build Options
 #   comment out to disable the options.
 #
-BOOTMAGIC_ENABLE ?= yes	# Virtual DIP switch configuration
-## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
-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
-SLEEP_LED_ENABLE ?= yes  # Breathing sleep LED during USB suspend
-NKRO_ENABLE ?= yes	    # USB Nkey Rollover
 CUSTOM_MATRIX ?= yes # Custom matrix file
 SERIAL_LINK_ENABLE = yes
-VISUALIZER_ENABLE ?= yes
+VISUALIZER_ENABLE ?= no #temporarily disabled to make everything compile
 LCD_ENABLE ?= yes
 LED_ENABLE ?= yes
 LCD_BACKLIGHT_ENABLE ?= yes
 
+ifndef QUANTUM_DIR
+	include ../../../Makefile
+endif
+
 ifdef LCD_ENABLE
-include drivers/gdisp/st7565ergodox/driver.mk
+include $(SUBPROJECT_PATH)/drivers/gdisp/st7565ergodox/driver.mk
 endif
 
 ifdef LED_ENABLE
-include drivers/gdisp/IS31FL3731C/driver.mk
+include $(SUBPROJECT_PATH)/drivers/gdisp/IS31FL3731C/driver.mk
 endif
-
-ifndef QUANTUM_DIR
-	include ../../Makefile
-endif

+ 0 - 0
keyboards/infinity_ergodox/bootloader_defs.h → keyboards/ergodox/infinity/bootloader_defs.h


+ 0 - 0
keyboards/infinity_ergodox/chconf.h → keyboards/ergodox/infinity/chconf.h


+ 10 - 15
keyboards/infinity_ergodox/config.h → keyboards/ergodox/infinity/config.h

@@ -15,8 +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/>.
 */
 
-#ifndef CONFIG_H
-#define CONFIG_H
+#ifndef INFINITY_ERGODOX_CONFIG_H
+#define INFINITY_ERGODOX_CONFIG_H
+
+#include "../config.h"
 
 
 /* USB Device descriptor parameter */
@@ -35,25 +37,18 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define MATRIX_COLS 5
 #define LOCAL_MATRIX_ROWS 9
 
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 3
+
+#define LED_BRIGHTNESS_LO       15
+#define LED_BRIGHTNESS_HI       255
+
 /* define if matrix has ghost */
 //#define MATRIX_HAS_GHOST
 
 /* Set 0 if debouncing isn't needed */
 #define DEBOUNCE    5
 
-/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
-//#define LOCKING_SUPPORT_ENABLE
-/* Locking resynchronize hack */
-//#define LOCKING_RESYNC_ENABLE
-
-/* key combination for command */
-#define IS_COMMAND() ( \
-    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
-)
-
-/* Keymap for Infiity prototype */
-#define INFINITY_PROTOTYPE
-
 #define SERIAL_LINK_BAUD 562500
 #define SERIAL_LINK_THREAD_PRIORITY (NORMALPRIO - 1)
 // The visualizer needs gfx thread priorities

+ 0 - 0
keyboards/infinity_ergodox/drivers/gdisp/IS31FL3731C/board_IS31FL3731C.h → keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/board_IS31FL3731C.h


+ 0 - 0
keyboards/infinity_ergodox/drivers/gdisp/IS31FL3731C/driver.mk → keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/driver.mk


+ 0 - 0
keyboards/infinity_ergodox/drivers/gdisp/IS31FL3731C/gdisp_IS31FL3731C.c → keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/gdisp_IS31FL3731C.c


+ 0 - 0
keyboards/infinity_ergodox/drivers/gdisp/IS31FL3731C/gdisp_lld_config.h → keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/gdisp_lld_config.h


+ 0 - 0
keyboards/infinity_ergodox/drivers/gdisp/emulator_lcd/driver.mk → keyboards/ergodox/infinity/drivers/gdisp/emulator_lcd/driver.mk


+ 0 - 0
keyboards/infinity_ergodox/drivers/gdisp/emulator_lcd/emulator_lcd.c → keyboards/ergodox/infinity/drivers/gdisp/emulator_lcd/emulator_lcd.c


+ 0 - 0
keyboards/infinity_ergodox/drivers/gdisp/emulator_led/driver.mk → keyboards/ergodox/infinity/drivers/gdisp/emulator_led/driver.mk


+ 0 - 0
keyboards/infinity_ergodox/drivers/gdisp/emulator_led/emulator_led.c → keyboards/ergodox/infinity/drivers/gdisp/emulator_led/emulator_led.c


+ 0 - 0
keyboards/infinity_ergodox/drivers/gdisp/st7565ergodox/board_ST7565.h → keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/board_ST7565.h


+ 0 - 0
keyboards/infinity_ergodox/drivers/gdisp/st7565ergodox/driver.mk → keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/driver.mk


+ 0 - 0
keyboards/infinity_ergodox/drivers/gdisp/st7565ergodox/gdisp_lld_ST7565.c → keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/gdisp_lld_ST7565.c


+ 0 - 0
keyboards/infinity_ergodox/drivers/gdisp/st7565ergodox/gdisp_lld_config.h → keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/gdisp_lld_config.h


+ 0 - 0
keyboards/infinity_ergodox/drivers/gdisp/st7565ergodox/st7565.h → keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/st7565.h


+ 0 - 0
keyboards/infinity_ergodox/gfxconf.h → keyboards/ergodox/infinity/gfxconf.h


+ 0 - 0
keyboards/infinity_ergodox/halconf.h → keyboards/ergodox/infinity/halconf.h


+ 58 - 2
keyboards/infinity_ergodox/infinity_ergodox.c → keyboards/ergodox/infinity/infinity.c

@@ -1,8 +1,10 @@
-#include "infinity_ergodox.h"
+#include "infinity.h"
 #include "ch.h"
 #include "hal.h"
 #include "serial_link/system/serial_link.h"
+#ifdef VISUALIZER_ENABLE
 #include "lcd_backlight.h"
+#endif
 
 void init_serial_link_hal(void) {
     PORTA->PCR[1] = PORTx_PCRn_PE | PORTx_PCRn_PS | PORTx_PCRn_PFE | PORTx_PCRn_MUX(2);
@@ -36,7 +38,7 @@ void init_serial_link_hal(void) {
 // Using a higher pre-scalar without flicker is possible but FTM0_MOD will need to be reduced
 // Which will reduce the brightness range
 #define PRESCALAR_DEFINE 0
-
+#ifdef VISUALIZER_ENABLE
 void lcd_backlight_hal_init(void) {
 	// Setup Backlight
     SIM->SCGC6 |= SIM_SCGC6_FTM0;
@@ -74,3 +76,57 @@ void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b) {
 	CHANNEL_GREEN.CnV = g;
 	CHANNEL_BLUE.CnV = b;
 }
+#endif
+
+__attribute__ ((weak))
+void matrix_init_user(void) {
+}
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {
+}
+
+
+void matrix_init_kb(void) {
+	// put your keyboard start-up code here
+	// runs once when the firmware starts up
+
+	matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+	// put your looping keyboard code here
+	// runs every cycle (a lot)
+
+	matrix_scan_user();
+}
+
+void ergodox_board_led_on(void){
+}
+
+void ergodox_right_led_1_on(void){
+}
+
+void ergodox_right_led_2_on(void){
+}
+
+void ergodox_right_led_3_on(void){
+}
+
+void ergodox_right_led_on(uint8_t led){
+}
+
+void ergodox_board_led_off(void){
+}
+
+void ergodox_right_led_1_off(void){
+}
+
+void ergodox_right_led_2_off(void){
+}
+
+void ergodox_right_led_3_off(void){
+}
+
+void ergodox_right_led_off(uint8_t led){
+}

+ 110 - 0
keyboards/ergodox/infinity/infinity.h

@@ -0,0 +1,110 @@
+#ifndef KEYBOARDS_ERGODOX_INFINITY_INFINITY_H_
+#define KEYBOARDS_ERGODOX_INFINITY_INFINITY_H_
+
+#include "quantum.h"
+
+void ergodox_board_led_on(void);
+void ergodox_right_led_1_on(void);
+void ergodox_right_led_2_on(void);
+void ergodox_right_led_3_on(void);
+void ergodox_right_led_on(uint8_t led);
+
+void ergodox_board_led_off(void);
+void ergodox_right_led_1_off(void);
+void ergodox_right_led_2_off(void);
+void ergodox_right_led_3_off(void);
+void ergodox_right_led_off(uint8_t led);
+
+inline void ergodox_led_all_on(void)
+{
+    ergodox_board_led_on();
+    ergodox_right_led_1_on();
+    ergodox_right_led_2_on();
+    ergodox_right_led_3_on();
+}
+
+inline void ergodox_led_all_off(void)
+{
+    ergodox_board_led_off();
+    ergodox_right_led_1_off();
+    ergodox_right_led_2_off();
+    ergodox_right_led_3_off();
+}
+
+inline void ergodox_right_led_1_set(uint8_t n){
+	if (n) {
+		ergodox_right_led_1_on();
+	} else {
+		ergodox_right_led_1_off();
+	}
+}
+
+inline void ergodox_right_led_2_set(uint8_t n){
+	if (n) {
+		ergodox_right_led_2_on();
+	} else {
+		ergodox_right_led_2_off();
+	}
+}
+
+inline void ergodox_right_led_3_set(uint8_t n){
+	if (n) {
+		ergodox_right_led_3_on();
+	} else {
+		ergodox_right_led_3_off();
+	}
+}
+
+inline void ergodox_right_led_set(uint8_t led, uint8_t n){
+	if (n) {
+		ergodox_right_led_on(led);
+	} else {
+		ergodox_right_led_off(led);
+	}
+}
+
+inline void ergodox_led_all_set(uint8_t n) {
+    ergodox_right_led_1_set(n);
+    ergodox_right_led_2_set(n);
+    ergodox_right_led_3_set(n);
+}
+
+#define KEYMAP( \
+    A80, A70, A60, A50, A40, A30, A20,  \
+    A81, A71, A61, A51, A41, A31, A21,  \
+    A82, A72, A62, A52, A42, A32,       \
+    A83, A73, A63, A53, A43, A33, A23,  \
+    A84, A74, A64, A54, A44,            \
+                                  A13, A03, \
+                                       A04, \
+                             A34, A24, A14, \
+         B20, B30, B40, B50, B60, B70, B80, \
+         B21, B31, B41, B51, B61, B71, B81, \
+              B32, B42, B52, B62, B72, B82, \
+         B23, B33, B43, B53, B63, B73, B83, \
+                   B44, B54, B64, B74, B84, \
+    B03, B13,     \
+    B04,          \
+    B14, B24, B34 \
+) { \
+    { KC_NO, KC_NO, KC_NO, A03,   A04 }, \
+    { KC_NO, KC_NO, KC_NO, A13,   A14 }, \
+    { A20,   A21,   KC_NO, A23,   A24 }, \
+    { A30,   A31,   A32,   A33,   A34 }, \
+    { A40,   A41,   A42,   A43,   A44 }, \
+    { A50,   A51,   A52,   A53,   A54 }, \
+    { A60,   A61,   A62,   A63,   A64 }, \
+    { A70,   A71,   A72,   A73,   A74 }, \
+    { A80,   A81,   A82,   A83,   A84 }, \
+    { KC_NO, KC_NO, KC_NO, B03,   B04 }, \
+    { KC_NO, KC_NO, KC_NO, B13,   B14 }, \
+    { B20,   B21,   KC_NO, B23,   B24 }, \
+    { B30,   B31,   B32,   B33,   B34 }, \
+    { B40,   B41,   B42,   B43,   B44 }, \
+    { B50,   B51,   B52,   B53,   B54 }, \
+    { B60,   B61,   B62,   B63,   B64 }, \
+    { B70,   B71,   B72,   B73,   B74 }, \
+    { B80,   B81,   B82,   B83,   B84 }  \
+}
+
+#endif /* KEYBOARDS_ERGODOX_INFINITY_INFINITY_H_ */

+ 0 - 0
keyboards/infinity_ergodox/led.c → keyboards/ergodox/infinity/led.c


+ 3 - 0
keyboards/infinity_ergodox/matrix.c → keyboards/ergodox/infinity/matrix.c

@@ -63,6 +63,8 @@ void matrix_init(void)
 
     memset(matrix, 0, MATRIX_ROWS);
     memset(matrix_debouncing, 0, LOCAL_MATRIX_ROWS);
+
+    matrix_init_quantum();
 }
 
 uint8_t matrix_scan(void)
@@ -127,6 +129,7 @@ uint8_t matrix_scan(void)
         }
         debouncing = false;
     }
+    matrix_scan_quantum();
     return 1;
 }
 

+ 0 - 0
keyboards/infinity_ergodox/mcuconf.h → keyboards/ergodox/infinity/mcuconf.h


+ 0 - 0
keyboards/ergodox_ez/keymaps/ab/Makefile → keyboards/ergodox/keymaps/ab/Makefile


+ 0 - 0
keyboards/ergodox_ez/keymaps/ab/keyboard-layout.json → keyboards/ergodox/keymaps/ab/keyboard-layout.json


+ 0 - 0
keyboards/ergodox_ez/keymaps/ab/keyboard-layout.png → keyboards/ergodox/keymaps/ab/keyboard-layout.png


+ 1 - 1
keyboards/ergodox_ez/keymaps/ab/keymap.c → keyboards/ergodox/keymaps/ab/keymap.c

@@ -1,4 +1,4 @@
-#include "ergodox_ez.h"
+#include "ergodox.h"
 #include "debug.h"
 #include "action_layer.h"
 

+ 0 - 0
keyboards/ergodox_ez/keymaps/ab/readme.md → keyboards/ergodox/keymaps/ab/readme.md


+ 1 - 1
keyboards/ergodox_ez/keymaps/adnw_k_o_y/keymap.c → keyboards/ergodox/keymaps/adnw_k_o_y/keymap.c

@@ -1,4 +1,4 @@
-#include "ergodox_ez.h"
+#include "ergodox.h"
 #include "debug.h"
 #include "action_layer.h"
 #include "keymap_german.h"

+ 0 - 0
keyboards/ergodox_ez/keymaps/adnw_k_o_y/readme.md → keyboards/ergodox/keymaps/adnw_k_o_y/readme.md


+ 1 - 1
keyboards/ergodox_ez/keymaps/alexjj/keymap.c → keyboards/ergodox/keymaps/alexjj/keymap.c

@@ -1,4 +1,4 @@
-#include "ergodox_ez.h"
+#include "ergodox.h"
 #include "debug.h"
 #include "action_layer.h"
 

+ 0 - 0
keyboards/ergodox_ez/keymaps/alexjj/readme.md → keyboards/ergodox/keymaps/alexjj/readme.md


+ 0 - 0
keyboards/ergodox_ez/keymaps/alexjj/rl-layout.jpg → keyboards/ergodox/keymaps/alexjj/rl-layout.jpg


+ 0 - 0
keyboards/ergodox_ez/keymaps/algernon/COPYING → keyboards/ergodox/keymaps/algernon/COPYING


+ 9 - 0
keyboards/ergodox_ez/keymaps/algernon/Makefile → keyboards/ergodox/keymaps/algernon/Makefile

@@ -3,11 +3,20 @@ COMMAND_ENABLE=no
 SLEEP_LED_ENABLE=no
 UNICODE_ENABLE=no
 FORCE_NKRO ?= yes
+DEBUG_ENABLE = no
+CONSOLE_ENABLE = no
+TAP_DANCE_ENABLE = yes
+KEYLOGGER_ENABLE ?= yes
 
 ifeq (${FORCE_NKRO},yes)
 OPT_DEFS += -DFORCE_NKRO
 endif
 
+ifeq (${KEYLOGGER_ENABLE},yes)
+OPT_DEFS += -DKEYLOGGER_ENABLE
+CONSOLE_ENABLE = yes
+endif
+
 KEYMAP_VERSION = $(shell \
  if [ -d "${KEYMAP_PATH}/.git" ]; then \
   cd "${KEYMAP_PATH}" && git describe --abbrev=6 --dirty --always --tags --match 'v*' 2>/dev/null; \

+ 0 - 0
keyboards/ergodox_ez/keymaps/algernon/config.h → keyboards/ergodox/keymaps/algernon/config.h


BIN
keyboards/ergodox/keymaps/algernon/images/adore-layer.png


BIN
keyboards/ergodox/keymaps/algernon/images/base-layer.png


BIN
keyboards/ergodox/keymaps/algernon/images/heatmap.png


+ 0 - 0
keyboards/ergodox_ez/keymaps/algernon/images/hun-layer.png → keyboards/ergodox/keymaps/algernon/images/hun-layer.png


+ 0 - 0
keyboards/ergodox_ez/keymaps/algernon/images/nav-n-media-layer.png → keyboards/ergodox/keymaps/algernon/images/nav-n-media-layer.png


+ 0 - 0
keyboards/ergodox_ez/keymaps/algernon/images/one-handed-layer.png → keyboards/ergodox/keymaps/algernon/images/one-handed-layer.png


+ 0 - 0
keyboards/ergodox_ez/keymaps/algernon/images/steno-layer.png → keyboards/ergodox/keymaps/algernon/images/steno-layer.png


+ 1218 - 1104
keyboards/ergodox_ez/keymaps/algernon/keymap.c → keyboards/ergodox/keymaps/algernon/keymap.c

@@ -1,1104 +1,1218 @@
-/*
- * algernon's ErgoDox EZ layout, please see the readme.md file!
- */
-
-#include "ergodox_ez.h"
-#include "led.h"
-#include "debug.h"
-#include "action_layer.h"
-#include "action_util.h"
-#include "mousekey.h"
-#include "timer.h"
-#include "keymap_plover.h"
-
-/* Layers */
-
-enum {
-  BASE = 0,
-  EXPRM,
-  ARRW,
-  APPSEL,
-  HUN,
-  NMDIA,
-  OHLFT,
-  OHRGT,
-  PLVR,
-};
-
-/* Macros */
-
-enum {
-  NONE = 0,
-  // Buttons that do extra stuff
-  A_GUI,
-  A_PLVR,
-  A_ESC,
-  A_MPN,
-
-  // Function / number keys
-  KF_1, // 1, F1
-  KF_2, // 2, F2
-  KF_3, // ...
-  KF_4,
-  KF_5,
-  KF_6,
-  KF_7,
-  KF_8,
-  KF_9,
-  KF_10,
-  KF_11, // =, F11
-
-  // Application select keys
-  APP_SLK, // Slack
-  APP_EMCS, // Emacs
-  APP_TERM, // Terminal
-  APP_CHRM, // Chrome
-  APP_MSIC, // Music
-
-  // Diagonal mouse movement
-  A_MUL,
-  A_MUR,
-  A_MDL,
-  A_MDR,
-
-  // Hungarian layer keys
-  HU_AA, // Á
-  HU_OO, // Ó
-  HU_EE, // É
-  HU_UU, // Ú
-  HU_II, // Í
-  HU_OE, // Ö
-  HU_UE, // Ü
-  HU_OEE, // Ő
-  HU_UEE, // Ű
-
-  // One-handed layout specials
-  OH_BSSPC,
-  OH_ENTSFT,
-  OH_BASE,
-  OH_LEFT,
-  OH_RIGHT,
-};
-
-/* Fn keys */
-
-enum {
-  F_BSE = 0,
-  F_HUN,
-  F_GUI,
-  F_SFT,
-  F_ALT,
-  F_CTRL
-};
-
-/* Custom keycodes */
-
-enum {
-  CT_CLN = 0x7101
-};
-
-/* States & timers */
-
-uint16_t gui_timer = 0;
-
-uint16_t kf_timers[12];
-
-uint16_t oh_base_timer = 0;
-uint16_t oh_bsspc_timer = 0;
-uint16_t oh_entsft_timer = 0;
-
-#define OH_BLINK_INTERVAL 500
-
-uint8_t oh_left_blink = 0;
-uint16_t oh_left_blink_timer = 0;
-uint8_t oh_right_blink = 0;
-uint16_t oh_right_blink_timer = 0;
-
-uint8_t ct_cln_count = 0;
-uint16_t ct_cln_timer = 0;
-
-/* The Keymap */
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
-/* Keymap 0: Base Layer
- *
- * ,-----------------------------------------------------.           ,-----------------------------------------------------.
- * |        `~ | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr |           | 1HND | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10|       F11 |
- * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
- * | Next/Prev |   '  |   ,  |   .  |   P  |   Y  |   [  |           |  ]   |   F  |   G  |   C  |   R  |  L   | \         |
- * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
- * |       Tab |   A  |   O  |   E  |   U  |   I  |------|           |------|   D  |   H  |   T  |   N  |  S   | =         |
- * |-----------+------+------+------+------+------|   (  |           |  )   |------+------+------+------+------+-----------|
- * | Play/Pause|   /  |   Q  |   J  |   K  |   X  |      |           |      |   B  |   M  |   W  |   V  |  Z   |      Stop |
- * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
- *     |       |      | Left |  Up  |   :  |                                       |   -  | Down | Rght |      |       |
- *     `-----------------------------------'                                       `-----------------------------------'
- *                                         ,-------------.           ,-------------.
- *                                         | LAlt | GUI  |           | MDIA | ARRW |
- *                                  ,------|------|------|           |------+------+------.
- *                                  |      |      | Ctrl |           | LEAD |      |      |
- *                                  |Backsp|LShift|------|           |------| Enter| Space|
- *                                  |      |      | ESC  |           | HUN  |      |      |
- *                                  `--------------------'           `--------------------'
- */
-[BASE] = KEYMAP(
-// left hand
- KC_GRV             ,M(KF_1)     ,M(KF_2)     ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR)
-,M(A_MPN)           ,KC_QUOT     ,KC_COMM     ,KC_DOT ,KC_P   ,KC_Y   ,KC_LBRC
-,KC_TAB             ,KC_A        ,KC_O        ,KC_E   ,KC_U   ,KC_I
-,KC_MPLY            ,KC_SLSH     ,KC_Q        ,KC_J   ,KC_K   ,KC_X   ,KC_LPRN
-,KC_NO              ,KC_NO       ,KC_LEFT     ,KC_UP  ,CT_CLN
-
-                                                            ,F(F_ALT),F(F_GUI)
-                                                                     ,F(F_CTRL)
-                                                    ,KC_BSPC,F(F_SFT),M(A_ESC)
-
-                                                                // right hand
-                                                               ,M(OH_LEFT),M(KF_6),M(KF_7),M(KF_8),M(KF_9)     ,M(KF_10)    ,KC_F11
-                                                               ,KC_RBRC   ,KC_F   ,KC_G   ,KC_C   ,KC_R        ,KC_L        ,KC_BSLS
-                                                                          ,KC_D   ,KC_H   ,KC_T   ,KC_N        ,KC_S        ,KC_EQL
-                                                               ,KC_RPRN   ,KC_B   ,KC_M   ,KC_W   ,KC_V        ,KC_Z        ,KC_MSTP
-                                                                                  ,KC_MINS,KC_DOWN,KC_RGHT     ,KC_NO       ,KC_NO
-
-                                                               ,OSL(NMDIA),OSL(ARRW)
-                                                               ,KC_LEAD
-                                                               ,F(F_HUN)  ,KC_ENT ,KC_SPC
-    ),
-
-/* Keymap 1: Experimental layer
- *
- * ,-----------------------------------------------------.           ,-----------------------------------------------------.
- * |        `~ | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr |           | 1HND | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10|       F11 |
- * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
- * | Next/Prev |   '  |   ,  |   .  |   P  |   Y  |   [  |           |  ]   |   L  |   F  |   C  |   R  |  J   | =         |
- * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
- * |       Tab |   A  |   O  |   E  |   U  |   I  |------|           |------|   D  |   H  |   T  |   N  |  S   | \         |
- * |-----------+------+------+------+------+------|   (  |           |  )   |------+------+------+------+------+-----------|
- * | Play/Pause|   Z  |   G  |   V  |   K  |   X  |      |           |      |   Q  |   M  |   W  |   B  |  /   |      Stop |
- * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
- *     |       |      | Left |  Up  |   :  |                                       |   -  | Down | Rght |      |       |
- *     `-----------------------------------'                                       `-----------------------------------'
- *                                         ,-------------.           ,-------------.
- *                                         | LAlt | GUI  |           | MDIA | ARRW |
- *                                  ,------|------|------|           |------+------+------.
- *                                  |      |      | Ctrl |           | LEAD |      |      |
- *                                  |Backsp|LShift|------|           |------| Enter| Space|
- *                                  |      |      | ESC  |           | HUN  |      |      |
- *                                  `--------------------'           `--------------------'
- */
-[EXPRM] = KEYMAP(
-// left hand
- KC_GRV             ,M(KF_1)     ,M(KF_2)     ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR)
-,M(A_MPN)           ,KC_QUOT     ,KC_COMM     ,KC_DOT ,KC_P   ,KC_Y   ,KC_LBRC
-,KC_TAB             ,KC_A        ,KC_O        ,KC_E   ,KC_U   ,KC_I
-,KC_MPLY            ,KC_Z        ,KC_G        ,KC_V   ,KC_K   ,KC_X   ,KC_LPRN
-,KC_NO              ,KC_NO       ,KC_LEFT     ,KC_UP  ,CT_CLN
-
-                                                            ,F(F_ALT),F(F_GUI)
-                                                                     ,F(F_CTRL)
-                                                    ,KC_BSPC,F(F_SFT),M(A_ESC)
-
-                                                                // right hand
-                                                               ,M(OH_LEFT),M(KF_6),M(KF_7),M(KF_8),M(KF_9)     ,M(KF_10)    ,KC_F11
-                                                               ,KC_RBRC   ,KC_L   ,KC_F   ,KC_C   ,KC_R        ,KC_J        ,KC_BSLS
-                                                                          ,KC_D   ,KC_H   ,KC_T   ,KC_N        ,KC_S        ,KC_EQL
-                                                               ,KC_RPRN   ,KC_Q   ,KC_M   ,KC_W   ,KC_B        ,KC_SLSH     ,KC_MSTP
-                                                                                  ,KC_MINS,KC_DOWN,KC_RGHT     ,KC_NO       ,KC_NO
-
-                                                               ,OSL(NMDIA),OSL(ARRW)
-                                                               ,KC_LEAD
-                                                               ,F(F_HUN)  ,KC_ENT ,KC_SPC
-    ),
-
-/* Keymap 2: Arrow layer
- *
- * ,-----------------------------------------------------.           ,-----------------------------------------------------.
- * |           |      |      |      |      |      |      |           |      |      |      |      |      |      |           |
- * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
- * |           |      |      |      |      |      |      |           |      |      |      |      |      |      |           |
- * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
- * |           |      |      |      |      |      |------|           |------|      |      |      |      |      |           |
- * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
- * |           |      |      |      |      |      |      |           |      |      |      |      |      |      |           |
- * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
- *      |      |      | Home | PgUp |      |                                       |      | PgDn | End  |      |      |
- *      `----------------------------------'                                       `----------------------------------'
- *                                         ,-------------.           ,-------------.
- *                                         |      |      |           |      |      |
- *                                  ,------|------|------|           |------+------+------.
- *                                  |      |      |      |           |      |      |      |
- *                                  |      |      |------|           |------|      |      |
- *                                  |      |      |      |           |      |      |      |
- *                                  `--------------------'           `--------------------'
- */
-
-[ARRW] = KEYMAP(
-// left hand
- KC_TRNS ,KC_TRNS    ,KC_TRNS   ,KC_TRNS    ,KC_TRNS    ,KC_TRNS    ,KC_TRNS
-,KC_TRNS ,KC_TRNS    ,KC_TRNS   ,KC_TRNS    ,KC_TRNS    ,KC_TRNS    ,KC_TRNS
-,KC_TRNS ,KC_TRNS    ,KC_TRNS   ,KC_TRNS    ,KC_TRNS    ,KC_TRNS
-,KC_TRNS ,KC_TRNS    ,KC_TRNS   ,KC_TRNS    ,KC_TRNS    ,KC_TRNS    ,KC_TRNS
-,KC_TRNS ,KC_TRNS    ,KC_HOME   ,KC_PGUP    ,KC_TRNS
-
-                                             ,KC_TRNS ,KC_TRNS
-                                                      ,KC_TRNS
-                                    ,KC_TRNS ,KC_TRNS ,KC_TRNS
-
-                                                                // right hand
-                                                               ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
-                                                               ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
-                                                                        ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
-                                                               ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
-                                                                                 ,KC_TRNS ,KC_PGDN ,KC_END  ,KC_TRNS ,KC_TRNS
-
-                                                               ,KC_TRNS ,KC_TRNS
-                                                               ,KC_TRNS
-                                                               ,KC_TRNS ,KC_TRNS ,KC_TRNS
-    ),
-
-/* Keymap 3: Application select layer
- *
- * ,-----------------------------------------------------.           ,-----------------------------------------------------.
- * |           |Music |Slack |Emacs |Term  |Chrome|      |           |      |      |      |      |      |      |           |
- * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
- * |           |      |      |      |      |      |      |           |      |      |      |      |      |      |           |
- * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
- * |           |      |      |      |      |      |------|           |------|      |      |      |      |      |           |
- * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
- * |           |      |      |      |      |      |      |           |      |      |      |      |      |      |           |
- * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
- *      |      |      |      |      |      |                                       |      |      |      |      |      |
- *      `----------------------------------'                                       `----------------------------------'
- *                                         ,-------------.           ,-------------.
- *                                         |      |      |           |      |      |
- *                                  ,------|------|------|           |------+------+------.
- *                                  |      |      |      |           |      |      |      |
- *                                  |      |      |------|           |------|      |      |
- *                                  |      |      |      |           |      |      |      |
- *                                  `--------------------'           `--------------------'
- */
-
-[APPSEL] = KEYMAP(
-// left hand
- KC_TRNS ,M(APP_MSIC),M(APP_SLK),M(APP_EMCS),M(APP_TERM),M(APP_CHRM),KC_TRNS
-,KC_TRNS ,KC_TRNS    ,KC_TRNS   ,KC_TRNS    ,KC_TRNS    ,KC_TRNS    ,KC_TRNS
-,KC_TRNS ,KC_TRNS    ,KC_TRNS   ,KC_TRNS    ,KC_TRNS    ,KC_TRNS
-,KC_TRNS ,KC_TRNS    ,KC_TRNS   ,KC_TRNS    ,KC_TRNS    ,KC_TRNS    ,KC_TRNS
-,KC_TRNS ,KC_TRNS    ,KC_TRNS   ,KC_TRNS    ,KC_TRNS
-
-                                             ,KC_TRNS ,KC_TRNS
-                                                      ,KC_TRNS
-                                    ,KC_TRNS ,KC_TRNS ,KC_TRNS
-
-                                                                // right hand
-                                                               ,KC_TRNS ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_TRNS
-                                                               ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
-                                                                        ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
-                                                               ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
-                                                                                 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
-
-                                                               ,KC_TRNS ,KC_TRNS
-                                                               ,KC_TRNS
-                                                               ,KC_TRNS ,KC_TRNS  ,KC_TRNS
-    ),
-
-
-/* Keymap 4: Hungarian Layer
- *
- * ,-----------------------------------------------------.           ,-----------------------------------------------------.
- * |           |      |      |      |      |      |      |           |      |      |      |      |      |      |           |
- * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
- * |           |      |  Ő   |      |  Ű   |      |      |           |      |      |      |      |      |      |           |
- * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
- * |           |   Á  |  Ó   |  É   |  Ú   |  Í   |------|           |------|      |      |      |      |      |           |
- * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
- * |           |      |  Ö   |      |  Ü   |      |      |           |      |      |      |      |      |      |           |
- * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
- *      |      |      |      |      |      |                                       |      |      |      |      |      |
- *      `----------------------------------'                                       `----------------------------------'
- *                                         ,-------------.           ,-------------.
- *                                         |      |      |           |      |      |
- *                                  ,------|------|------|           |------+------+------.
- *                                  |      |      |      |           |      |      |      |
- *                                  |      |      |------|           |------|      |      |
- *                                  |      |      |      |           | BASE |      |      |
- *                                  `--------------------'           `--------------------'
- */
-
-[HUN] = KEYMAP(
-// left hand
- KC_NO   ,KC_NO   ,KC_NO    ,KC_NO   ,KC_NO    ,KC_NO   ,KC_NO
-,KC_NO   ,KC_NO   ,M(HU_OEE),KC_NO   ,M(HU_UEE),KC_NO   ,KC_NO
-,KC_NO   ,M(HU_AA),M(HU_OO) ,M(HU_EE),M(HU_UU) ,M(HU_II)
-,KC_NO   ,KC_NO   ,M(HU_OE) ,KC_NO   ,M(HU_UE) ,KC_NO   ,KC_NO
-,KC_NO   ,KC_NO   ,KC_NO    ,KC_NO   ,KC_NO
-
-                                             ,KC_NO   ,KC_NO
-                                                      ,KC_NO
-                                    ,KC_NO   ,KC_TRNS ,KC_TRNS
-
-                                                                // right hand
-                                                               ,KC_TRNS ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO
-                                                               ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO
-                                                                        ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO
-                                                               ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO
-                                                                                 ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO
-
-                                                               ,KC_NO   ,KC_NO
-                                                               ,KC_NO
-                                                               ,F(F_BSE),KC_TRNS  ,KC_TRNS
-    ),
-
-/* Keymap 5: Navigation & Media layer
- *
- * ,-----------------------------------------------------.           ,-----------------------------------------------------.
- * | MS Slow   |      |      |      |      |      |ScrLCK|           |ScrLCK|      |      |      |      |      |           |
- * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
- * | MS Normal |      | Home |  Up  | PgUp |      |      |           |Scroll|      |MsUpL | MsUp |MsUpR |      |PrintScreen|
- * |-----------+------+------+------+------+------|      |           |  Up  |------+------+------+------+------+-----------|
- * | MS Fast   |      | Left | Down | Right|      |------|           |------|      |MsLeft| MsDn |MsRght|      |           |
- * |-----------+------+------+------+------+------|      |           |Scroll|------+------+------+------+------+-----------|
- * | Play/Pause|      | End  | Down | PgDn |      |      |           | Down |      |MsDnL | MsDn |MsDnR |      |      Stop |
- * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
- *      |      |      |      |      |      |                                       |      |      |      |      |      |
- *      `----------------------------------'                                       `----------------------------------'
- *                                         ,-------------.           ,-------------.
- *                                         | Mute | VlUp |           | BASE | MClk |
- *                                  ,------|------|------|           |------+------+------.
- *                                  |      |      | VlDn |           | Prev |Left  |Right |
- *                                  |  SPC | Enter|------|           |------| Click| Click|
- *                                  |      |      | ESC  |           | Next |      |      |
- *                                  `--------------------'           `--------------------'
- */
-[NMDIA] = KEYMAP(
-// left hand
- KC_ACL0    ,KC_NO       ,KC_NO      ,KC_NO   ,KC_NO   ,KC_NO   ,LGUI(KC_L)
-,KC_ACL1    ,KC_NO       ,KC_HOME    ,KC_UP   ,KC_PGUP ,KC_NO   ,KC_NO
-,KC_ACL2    ,KC_NO       ,KC_LEFT    ,KC_DOWN ,KC_RIGHT,KC_NO
-,KC_MPLY    ,KC_NO       ,KC_END     ,KC_DOWN ,KC_PGDN ,KC_NO   ,KC_NO
-,KC_NO      ,KC_NO       ,KC_NO      ,KC_NO   ,KC_NO
-                                                        ,KC_MUTE ,KC_VOLU
-                                                                 ,KC_VOLD
-                                                 ,KC_SPC,KC_ENTER,M(A_ESC)
-
-                                                                     // right hand
-                                                                     ,LGUI(KC_L),KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO    ,KC_NO
-                                                                     ,KC_WH_U   ,KC_NO   ,M(A_MUL),KC_MS_U ,M(A_MUR),KC_NO    ,KC_PSCR
-                                                                                ,KC_NO   ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_NO    ,KC_NO
-                                                                     ,KC_WH_D   ,KC_NO   ,M(A_MDL),KC_MS_D ,M(A_MDR),KC_NO    ,KC_MSTP
-                                                                                         ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO    ,KC_NO
-
-                                                                     ,KC_TRNS   ,KC_MS_BTN3
-                                                                     ,KC_MPRV
-                                                                     ,KC_MNXT   ,KC_BTN1 ,KC_BTN2
-    ),
-
-/* Keymap 6: One-handed, left side
- *
- * ,-----------------------------------------------------.
- * |        `~ | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 |A  BSE|
- * |-----------+------+------+------+------+-------------|
- * |       Tab |   '  |   ,  |   .  |   P  |   Y  |   [  |
- * |-----------+------+------+------+------+------|      |
- * |         - |   A  |   O  |   E  |   U  |   I  |------|
- * |-----------+------+------+------+------+------|   (  |
- * | Play/Pause|   ;  |   Q  |   J  |   K  |   X  |      |
- * `-----------+------+------+------+------+-------------'
- *     |  Home | End  | Down |  Up  | ESC  |
- *     `-----------------------------------'
- *                                         ,-------------.
- *                                         | LAlt | GUI  |
- *                                  ,------|------|------|
- *                                  |BackSp|LShift| Ctrl |
- *                                  |      |      |------|
- *                                  |Space |Enter |OTHER |
- *                                  `--------------------'
- */
-[OHLFT] = KEYMAP(
-// left hand
- KC_GRV     ,M(KF_1)     ,M(KF_2)     ,M(KF_3)   ,M(KF_4)    ,M(KF_5) ,M(OH_BASE)
-,KC_TAB     ,KC_QUOT     ,KC_COMM     ,KC_DOT    ,KC_P       ,KC_Y    ,KC_LBRC
-,KC_MINS    ,KC_A        ,KC_O        ,KC_E      ,KC_U       ,KC_I
-,KC_MPLY    ,KC_SCLN     ,KC_Q        ,KC_J      ,KC_K       ,KC_X    ,KC_LPRN
-,KC_HOME    ,KC_END      ,KC_DOWN     ,KC_UP     ,M(A_ESC)
-
-                                                                ,KC_TRNS     ,KC_TRNS
-                                                                             ,KC_TRNS
-                                                    ,M(OH_BSSPC),M(OH_ENTSFT),M(OH_RIGHT)
-
-                                                                // right hand
-                                                               ,KC_NO   ,KC_NO  ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
-                                                               ,KC_NO   ,KC_NO  ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
-                                                                        ,KC_NO  ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
-                                                               ,KC_NO   ,KC_NO  ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
-                                                                                ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
-
-                                                               ,KC_NO   ,KC_NO
-                                                               ,KC_NO
-                                                               ,KC_NO   ,KC_NO  ,KC_NO
-    ),
-
-/* Keymap 7: One-handed, right side
- *
- * ,-----------------------------------------------------.
- * | =     F11 | 0 F10| 9 F9 | 8 F8 | 7 F7 | 6 F6 |A  BSE|
- * |-----------+------+------+------+------+-------------|
- * |         / |   L  |   R  |   C  |   G  |   F  |   ]  |
- * |-----------+------+------+------+------+------|      |
- * |         \ |   S  |   N  |   T  |   H  |   D  |------|
- * |-----------+------+------+------+------+------|   )  |
- * |      Stop |   Z  |   V  |   W  |   M  |   B  |      |
- * `-----------+------+------+------+------+-------------'
- *     |  PgDn | PgUp | Right| Left | ESC  |
- *     `-----------------------------------'
- *                                         ,-------------.
- *                                         | LAlt | GUI  |
- *                                  ,------|------|------|
- *                                  |BackSp|LShift| Ctrl |
- *                                  |      |      |------|
- *                                  |Space |Enter |OTHER |
- *                                  `--------------------'
- */
-[OHRGT] = KEYMAP(
-// left hand
- M(KF_11)   ,M(KF_10)    ,M(KF_9)     ,M(KF_8)   ,M(KF_7)    ,M(KF_6) ,M(OH_BASE)
-,KC_SLSH    ,KC_L        ,KC_R        ,KC_C      ,KC_G       ,KC_F    ,KC_RBRC
-,KC_BSLS    ,KC_S        ,KC_N        ,KC_T      ,KC_H       ,KC_D
-,KC_MSTP    ,KC_Z        ,KC_V        ,KC_W      ,KC_M       ,KC_B    ,KC_RPRN
-,KC_PGDN    ,KC_PGUP     ,KC_RGHT     ,KC_LEFT   ,M(A_ESC)
-
-                                                                ,KC_TRNS     ,KC_TRNS
-                                                                             ,KC_TRNS
-                                                    ,M(OH_BSSPC),M(OH_ENTSFT),M(OH_LEFT)
-
-                                                                // right hand
-                                                               ,KC_NO   ,KC_NO  ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
-                                                               ,KC_NO   ,KC_NO  ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
-                                                                        ,KC_NO  ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
-                                                               ,KC_NO   ,KC_NO  ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
-                                                                                ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
-
-                                                               ,KC_NO   ,KC_NO
-                                                               ,KC_NO
-                                                               ,KC_NO   ,KC_NO  ,KC_NO
-    ),
-
-/* Keymap 8: Steno for Plover
- *
- * ,--------------------------------------------------.           ,--------------------------------------------------.
- * |        |      |      |      |      |      | BASE |           |      |      |      |      |      |      |        |
- * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
- * |        |   #  |   #  |   #  |   #  |   #  |   #  |           |  #   |  #   |  #   |   #  |   #  |  #   |   #    |
- * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
- * |        |      |   T  |   P  |   H  |      |------|           |------|      |  F   |   P  |   L  |  T   |   D    |
- * |--------+   S  +------+------+------+   *  |   *  |           |  *   |  *   +------+------+------+------+--------|
- * |        |      |   K  |   W  |   R  |      |      |           |      |      |  R   |   B  |   G  |  S   |   Z    |
- * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
- *   |      |      |      |      |      |                                       |      |      |      |      |      |
- *   `----------------------------------'                                       `----------------------------------'
- *                                        ,-------------.       ,-------------.
- *                                        |      |      |       |      |      |
- *                                 ,------|------|------|       |------+------+------.
- *                                 |      |      |      |       |      |      |      |
- *                                 |   A  |   O  |------|       |------|  E   |  U   |
- *                                 |      |      |      |       |      |      |      |
- *                                 `--------------------'       `--------------------'
- */
-
-[PLVR] = KEYMAP(
-// left hand
-KC_NO,  KC_NO,  KC_NO,  KC_NO,   KC_NO,  KC_NO,   M(A_PLVR),
-KC_NO,  PV_NUM, PV_NUM, PV_NUM,  PV_NUM, PV_NUM,  PV_NUM,
-KC_NO,  PV_LS,  PV_LT,  PV_LP,   PV_LH,  PV_STAR,
-KC_NO,  PV_LS,  PV_LK,  PV_LW,   PV_LR,  PV_STAR, PV_STAR,
-KC_NO,  KC_NO,  KC_NO,  KC_NO,   KC_NO,
-                                           KC_NO, KC_NO,
-                                           KC_NO,
-                                           PV_A,  PV_O,  KC_NO,
-
-                                                 // right hand
-                                                 KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_NO,
-                                                 PV_NUM,  PV_NUM,  PV_NUM,  PV_NUM,  PV_NUM,  PV_NUM,  PV_NUM,
-                                                          PV_STAR, PV_RF,   PV_RP,   PV_RL,   PV_RT,   PV_RD,
-                                                 PV_STAR, PV_STAR, PV_RR,   PV_RB,   PV_RG,   PV_RS,   PV_RZ,
-                                                                   KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_NO,
-                                           KC_NO,      KC_NO,
-                                           KC_NO,
-                                           KC_NO,PV_E, PV_U
- ),
-
-};
-
-const uint16_t PROGMEM fn_actions[] = {
-   [F_BSE]  = ACTION_LAYER_CLEAR(ON_PRESS)
-  ,[F_HUN]  = ACTION_LAYER_INVERT(HUN, ON_PRESS)
-  ,[F_GUI]  = ACTION_MACRO_TAP(A_GUI)
-  ,[F_SFT]  = ACTION_MODS_ONESHOT (MOD_LSFT)
-  ,[F_ALT]  = ACTION_MODS_ONESHOT (MOD_LALT)
-  ,[F_CTRL] = ACTION_MODS_ONESHOT (MOD_LCTL)
-};
-
-void toggle_steno(int pressed)
-{
-  uint8_t layer = biton32(layer_state);
-
-  if (pressed) {
-    if (layer != PLVR) layer_on(PLVR); else layer_off(PLVR);
-
-    register_code(PV_LP);
-    register_code(PV_LH);
-    register_code(PV_LR);
-    register_code(PV_O);
-    register_code(PV_RL);
-    register_code(PV_RG);
-  } else {
-    unregister_code(PV_LP);
-    unregister_code(PV_LH);
-    unregister_code(PV_LR);
-    unregister_code(PV_O);
-    unregister_code(PV_RL);
-    unregister_code(PV_RG);
-  }
-}
-
-macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_char)
-{
-  uint8_t need_shift = 0;
-  uint8_t hold_shift = 0;
-
-  if (!record->event.pressed)
-    return MACRO_NONE;
-
-  layer_off (HUN);
-
-  if (keyboard_report->mods & MOD_BIT (KC_LSFT)) {
-    hold_shift = 1;
-    need_shift = 1;
-    unregister_code (KC_LSFT);
-  }
-  if ((get_oneshot_mods () & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out ()) {
-    need_shift = 1;
-    hold_shift = 0;
-    unregister_code (KC_LSFT);
-  }
-
-  clear_oneshot_mods ();
-
-  register_code (KC_RALT);
-  unregister_code (KC_RALT);
-  if (accent == (KC_DQT)) {
-    register_code (KC_RSFT);
-  }
-  register_code (accent);
-  unregister_code (accent);
-  if (need_shift && accent != (KC_DQT)) {
-    register_code (KC_RSFT);
-  } else if (accent == (KC_DQT) && !need_shift) {
-    unregister_code (KC_RSFT);
-  }
-  register_code (hun_char);
-  unregister_code (hun_char);
-  if (need_shift || accent == (KC_DQT))
-    unregister_code (KC_RSFT);
-  if (hold_shift)
-    register_code (KC_LSFT);
-
-  return MACRO_NONE;
-}
-
-void ang_handle_kf (keyrecord_t *record, uint8_t id)
-{
-  uint8_t code = id - KF_1;
-
-  if (record->event.pressed) {
-    kf_timers[code] = timer_read ();
-  } else {
-    uint8_t kc;
-
-    if (timer_elapsed (kf_timers[code]) > TAPPING_TERM) {
-      // Long press
-      kc = KC_F1 + code;
-    } else {
-      if (id == KF_11)
-        kc = KC_EQL;
-      else
-        kc = KC_1 + code;
-    }
-
-    register_code (kc);
-    unregister_code (kc);
-  }
-}
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
-      switch(id) {
-      case A_ESC:
-        if (record->event.pressed) {
-          if ((get_oneshot_mods ()) && !has_oneshot_mods_timed_out ()) {
-            clear_oneshot_mods ();
-          } else {
-            register_code (KC_ESC);
-          }
-          layer_off (HUN);
-        } else {
-          unregister_code (KC_ESC);
-        }
-        break;
-
-      case A_MPN:
-        if (record->event.pressed) {
-          if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
-              ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) {
-            int oneshot = ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out());
-
-            if (oneshot)
-              clear_oneshot_mods ();
-            unregister_code (KC_LSFT);
-
-            register_code (KC_MPRV);
-            unregister_code (KC_MPRV);
-
-            if (!oneshot)
-              register_code (KC_LSFT);
-          } else {
-            return MACRO (T(MNXT), END);
-          }
-        }
-        break;
-
-        /* Hungarian layer */
-      case HU_AA:
-        return ang_do_hun (record, KC_QUOT, KC_A);
-      case HU_OO:
-        return ang_do_hun (record, KC_QUOT, KC_O);
-      case HU_EE:
-        return ang_do_hun (record, KC_QUOT, KC_E);
-      case HU_UU:
-        return ang_do_hun (record, KC_QUOT, KC_U);
-      case HU_II:
-        return ang_do_hun (record, KC_QUOT, KC_I);
-      case HU_OE:
-        return ang_do_hun (record, KC_DQT, KC_O);
-      case HU_UE:
-        return ang_do_hun (record, KC_DQT, KC_U);
-      case HU_OEE:
-        return ang_do_hun (record, KC_EQL, KC_O);
-      case HU_UEE:
-        return ang_do_hun (record, KC_EQL, KC_U);
-
-        /* Mouse movement */
-      case A_MUL:
-        if (record->event.pressed) {
-          mousekey_on(KC_MS_UP);
-          mousekey_on(KC_MS_LEFT);
-        } else {
-          mousekey_off(KC_MS_UP);
-          mousekey_off(KC_MS_LEFT);
-        }
-        mousekey_send();
-        break;
-
-      case A_MUR:
-        if (record->event.pressed) {
-          mousekey_on(KC_MS_UP);
-          mousekey_on(KC_MS_RIGHT);
-        } else {
-          mousekey_off(KC_MS_UP);
-          mousekey_off(KC_MS_RIGHT);
-        }
-        mousekey_send();
-        break;
-
-      case A_MDL:
-        if (record->event.pressed) {
-          mousekey_on(KC_MS_DOWN);
-          mousekey_on(KC_MS_LEFT);
-        } else {
-          mousekey_off(KC_MS_DOWN);
-          mousekey_off(KC_MS_LEFT);
-        }
-        mousekey_send();
-        break;
-
-      case A_MDR:
-        if (record->event.pressed) {
-          mousekey_on(KC_MS_DOWN);
-          mousekey_on(KC_MS_RIGHT);
-        } else {
-          mousekey_off(KC_MS_DOWN);
-          mousekey_off(KC_MS_RIGHT);
-        }
-        mousekey_send();
-        break;
-
-        /* Plover base */
-      case A_PLVR:
-        toggle_steno(record->event.pressed);
-        break;
-
-        /* GUI & AppSel */
-      case A_GUI:
-        if (record->event.pressed) {
-          register_code (KC_LGUI);
-          if (record->tap.count && !record->tap.interrupted) {
-            if (record->tap.count >= 2) {
-              register_code (KC_W);
-              layer_on (APPSEL);
-              set_oneshot_layer (APPSEL, ONESHOT_START);
-            }
-          } else {
-            record->tap.count = 0;
-          }
-          gui_timer = 0;
-        } else {
-          if (record->tap.count >= 2)
-            {
-              unregister_code (KC_W);
-              clear_oneshot_layer_state (ONESHOT_PRESSED);
-            }
-          gui_timer = timer_read ();
-        }
-        break;
-
-      case APP_SLK:
-        return MACRODOWN(T(S), T(L), T(A), T(C), T(K), T(ENT), END);
-
-      case APP_EMCS:
-        return MACRODOWN(T(E), T(M), T(A), T(C), T(S), T(ENT), END);
-
-      case APP_TERM:
-        return MACRODOWN(T(T), T(E), T(R), T(M), T(ENT), END);
-
-      case APP_CHRM:
-        return MACRODOWN(T(C), T(H), T(R), T(O), T(M), T(ENT), END);
-
-      case APP_MSIC:
-        return MACRODOWN(T(R), T(H), T(Y), T(T), T(H), T(M), T(B), T(O), T(X), T(ENT), END);
-
-        /* Function keys */
-      case KF_1 ... KF_11:
-        ang_handle_kf (record, id);
-        break;
-
-        /* 1HAND layout */
-      case OH_BASE:
-        if (record->event.pressed) {
-          oh_base_timer = timer_read ();
-        } else {
-          if (timer_elapsed (oh_base_timer) > TAPPING_TERM) {
-            layer_clear ();
-          } else {
-            return MACRO (T(APP), END);
-          }
-        }
-        break;
-
-      case OH_BSSPC:
-        if (record->event.pressed) {
-          oh_bsspc_timer = timer_read ();
-        } else {
-          if (timer_elapsed (oh_bsspc_timer) > TAPPING_TERM) {
-            return MACRO (T(BSPC), END);
-          } else {
-            return MACRO (T(SPC), END);
-          }
-        }
-        break;
-
-      case OH_ENTSFT:
-        if (record->event.pressed) {
-          oh_entsft_timer = timer_read ();
-        } else {
-          if (timer_elapsed (oh_entsft_timer) > TAPPING_TERM) {
-            if (keyboard_report->mods & MOD_BIT(KC_LSFT))
-              unregister_code (KC_LSFT);
-            else
-              register_code (KC_LSFT);
-          } else {
-            return MACRO (T(ENT), END);
-          }
-        }
-        break;
-
-      case OH_LEFT:
-        if (record->event.pressed) {
-          layer_move (OHLFT);
-          oh_left_blink = 1;
-          oh_left_blink_timer = timer_read ();
-          ergodox_right_led_1_on ();
-        }
-        break;
-
-      case OH_RIGHT:
-        if (record->event.pressed) {
-          layer_move (OHRGT);
-          oh_right_blink = 1;
-          oh_right_blink_timer = timer_read ();
-          ergodox_right_led_3_on ();
-        }
-        break;
-      }
-      return MACRO_NONE;
-};
-
-// Runs just one time when the keyboard initializes.
-void matrix_init_user(void) {
-  ergodox_led_all_on();
-  for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) {
-    ergodox_led_all_set (i);
-    _delay_ms (5);
-  }
-  _delay_ms(1000);
-  for (int i = LED_BRIGHTNESS_LO; i > 0; i--) {
-    ergodox_led_all_set (i);
-    _delay_ms (10);
-  }
-  ergodox_led_all_off();
-};
-
-LEADER_EXTERNS();
-
-void ang_do_unicode (void) {
-  register_code (KC_RCTL);
-  register_code (KC_RSFT);
-  register_code (KC_U);
-  unregister_code (KC_U);
-  unregister_code (KC_RSFT);
-  unregister_code (KC_RCTL);
-  _delay_ms (100);
-}
-
-void ang_tap (uint16_t codes[]) {
-  for (int i = 0; codes[i] != 0; i++) {
-    register_code (codes[i]);
-    unregister_code (codes[i]);
-    _delay_ms (50);
-  }
-}
-
-#define TAP_ONCE(code) \
-  register_code (code); \
-  unregister_code (code)
-
-uint8_t is_exp = 0;
-
-// Runs constantly in the background, in a loop.
-void matrix_scan_user(void) {
-  uint8_t layer = biton32(layer_state);
-
-  if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM)
-    unregister_code (KC_LGUI);
-
-  if (ct_cln_timer && timer_elapsed (ct_cln_timer) > TAPPING_TERM) {
-    if (ct_cln_count == 1) {
-      register_code (KC_RSFT);
-      register_code (KC_SCLN);
-      unregister_code (KC_SCLN);
-      unregister_code (KC_RSFT);
-    } else if (ct_cln_count == 2) {
-      register_code (KC_SCLN);
-      unregister_code (KC_SCLN);
-    }
-
-    ct_cln_count = 0;
-    ct_cln_timer = 0;
-  }
-
-  if (layer != OHLFT)
-    oh_left_blink = 0;
-  if (layer != OHRGT)
-    oh_right_blink = 0;
-
-  if (layer == HUN) {
-    ergodox_right_led_2_on();
-    ergodox_right_led_3_on();
-  } else if (layer == NMDIA) {
-    ergodox_right_led_1_on();
-    ergodox_right_led_2_on();
-  } else if (layer == PLVR) {
-    ergodox_right_led_1_on ();
-    ergodox_right_led_2_on ();
-    ergodox_right_led_3_on ();
-  } else if (layer == EXPRM) {
-    ergodox_right_led_1_on ();
-    ergodox_right_led_2_on ();
-    ergodox_right_led_3_on ();
-
-    ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
-  }
-
-  if (layer == OHLFT || layer == OHRGT) {
-    ergodox_right_led_2_on();
-
-    if (oh_left_blink) {
-      if (timer_elapsed (oh_left_blink_timer) > OH_BLINK_INTERVAL) {
-        if ((keyboard_report->mods & MOD_BIT(KC_LSFT)) == 0)
-          ergodox_right_led_1_off ();
-      }
-      if (timer_elapsed (oh_left_blink_timer) > OH_BLINK_INTERVAL * 2) {
-        ergodox_right_led_1_on ();
-        oh_left_blink_timer = timer_read ();
-      }
-    }
-
-    if (oh_right_blink) {
-      if (timer_elapsed (oh_right_blink_timer) > OH_BLINK_INTERVAL) {
-        if ((keyboard_report->mods & MOD_BIT(KC_LCTRL)) == 0)
-          ergodox_right_led_3_off ();
-      }
-      if (timer_elapsed (oh_right_blink_timer) > OH_BLINK_INTERVAL * 2) {
-        ergodox_right_led_3_on ();
-        oh_right_blink_timer = timer_read ();
-      }
-    }
-  }
-
-  if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
-      ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) {
-    ergodox_right_led_1_set (LED_BRIGHTNESS_HI);
-    ergodox_right_led_1_on ();
-  } else {
-    ergodox_right_led_1_set (LED_BRIGHTNESS_LO);
-    if (layer != OHLFT && layer != NMDIA && layer != PLVR && layer != EXPRM)
-      ergodox_right_led_1_off ();
-  }
-
-  if (keyboard_report->mods & MOD_BIT(KC_LALT) ||
-      ((get_oneshot_mods() & MOD_BIT(KC_LALT)) && !has_oneshot_mods_timed_out())) {
-    ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
-    ergodox_right_led_2_on ();
-  } else {
-    ergodox_right_led_2_set (LED_BRIGHTNESS_LO);
-    if (layer != OHRGT && layer != HUN && layer != OHLFT && layer != NMDIA && layer != PLVR && layer != EXPRM)
-      ergodox_right_led_2_off ();
-  }
-
-  if (keyboard_report->mods & MOD_BIT(KC_LCTRL) ||
-      ((get_oneshot_mods() & MOD_BIT(KC_LCTRL)) && !has_oneshot_mods_timed_out())) {
-    ergodox_right_led_3_set (LED_BRIGHTNESS_HI);
-    ergodox_right_led_3_on ();
-  } else {
-    ergodox_right_led_3_set (LED_BRIGHTNESS_LO);
-    if (layer != OHRGT && layer != HUN && layer != PLVR && layer != EXPRM)
-      ergodox_right_led_3_off ();
-  }
-
-  LEADER_DICTIONARY() {
-    leading = false;
-    leader_end ();
-
-    SEQ_ONE_KEY (KC_U) {
-      ang_do_unicode ();
-    }
-
-    SEQ_ONE_KEY (KC_V) {
-      SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ (" QMK_VERSION "/" KEYMAP_VERSION ")");
-    }
-
-    SEQ_ONE_KEY (KC_L) {
-      /* λ */
-      ang_do_unicode ();
-
-      uint16_t codes[] = {KC_0, KC_3, KC_B, KC_B, KC_ENT, 0};
-      ang_tap (codes);
-    }
-
-    SEQ_ONE_KEY (KC_Y) {
-      uint16_t codes[] = {KC_BSLS, KC_O, KC_SLSH, 0};
-      ang_tap (codes);
-    }
-
-    SEQ_ONE_KEY (KC_S) {
-      ang_do_unicode (); TAP_ONCE (KC_A); TAP_ONCE (KC_F); TAP_ONCE (KC_SPC);
-      TAP_ONCE (KC_BSLS);
-      register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT);
-      ang_do_unicode (); TAP_ONCE (KC_3); TAP_ONCE (KC_0); TAP_ONCE (KC_C); TAP_ONCE (KC_4); TAP_ONCE (KC_SPC);
-      register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT);
-      TAP_ONCE (KC_SLSH);
-      ang_do_unicode (); TAP_ONCE (KC_A); TAP_ONCE (KC_F); TAP_ONCE (KC_SPC);
-    }
-
-    SEQ_TWO_KEYS (KC_W, KC_M) {
-      register_code (KC_LALT);
-      register_code (KC_F2);
-      unregister_code (KC_F2);
-      unregister_code (KC_LALT);
-
-      _delay_ms (1000);
-
-      uint16_t codes[] = {KC_M, KC_A, KC_X, KC_MINS, KC_F, KC_O, KC_C, KC_U, KC_S, KC_E, KC_D, KC_ENT, 0};
-      ang_tap (codes);
-      register_code (KC_LGUI);
-      register_code (KC_UP);
-      unregister_code (KC_UP);
-      unregister_code (KC_LGUI);
-    }
-
-    SEQ_ONE_KEY (KC_E) {
-      if (is_exp == 0) {
-        default_layer_and (0);
-        default_layer_or ((1 << EXPRM));
-        is_exp = 1;
-
-        ergodox_led_all_off ();
-        ergodox_right_led_3_on ();
-        _delay_ms (100);
-        ergodox_right_led_2_on ();
-        _delay_ms (100);
-        ergodox_right_led_3_off ();
-        ergodox_right_led_1_on ();
-        _delay_ms (100);
-        ergodox_right_led_2_off ();
-        _delay_ms (100);
-        ergodox_right_led_1_off ();
-      } else {
-        is_exp = 0;
-        default_layer_and (0);
-        default_layer_or (1 << BASE);
-
-        ergodox_led_all_off ();
-        ergodox_right_led_1_on ();
-        _delay_ms (100);
-        ergodox_right_led_2_on ();
-        _delay_ms (100);
-        ergodox_right_led_1_off ();
-        ergodox_right_led_3_on ();
-        _delay_ms (100);
-        ergodox_right_led_2_off ();
-        _delay_ms (100);
-        ergodox_right_led_3_off ();
-      }
-    }
-  }
-}
-
-bool process_record_user (uint16_t keycode, keyrecord_t *record) {
-  switch(keycode) {
-  case CT_CLN:
-    if (record->event.pressed) {
-      ct_cln_count++;
-      ct_cln_timer = timer_read ();
-    } else {
-    }
-    return false;
-    break;
-
-  default:
-    if (ct_cln_count == 1) {
-      register_code (KC_RSFT);
-      register_code (KC_SCLN);
-      unregister_code (KC_SCLN);
-      unregister_code (KC_RSFT);
-    } else if (ct_cln_count == 2) {
-      register_code (KC_SCLN);
-      unregister_code (KC_SCLN);
-    }
-    ct_cln_count = 0;
-    ct_cln_timer = 0;
-    break;
-  }
-
-  return true;
-}
+/*
+ * algernon's ErgoDox EZ layout, please see the readme.md file!
+ */
+
+#include "ergodox.h"
+#include "led.h"
+#include "debug.h"
+#include "action_layer.h"
+#include "action_util.h"
+#include "mousekey.h"
+#include "timer.h"
+#include "keymap_plover.h"
+#include "eeconfig.h"
+#include "wait.h"
+#include "version.h"
+
+/* Layers */
+
+enum {
+  BASE = 0,
+  ADORE,
+  ARRW,
+  APPSEL,
+  HUN,
+  NMDIA,
+  OHLFT,
+  OHRGT,
+  PLVR,
+};
+
+/* Macros */
+
+enum {
+  NONE = 0,
+  // Buttons that do extra stuff
+  A_GUI,
+  A_PLVR,
+  A_ESC,
+  A_MPN,
+
+  // Function / number keys
+  KF_1, // 1, F1
+  KF_2, // 2, F2
+  KF_3, // ...
+  KF_4,
+  KF_5,
+  KF_6,
+  KF_7,
+  KF_8,
+  KF_9,
+  KF_10,
+  KF_11, // =, F11
+
+  // Application select keys
+  APP_SLK, // Slack
+  APP_EMCS, // Emacs
+  APP_TERM, // Terminal
+  APP_CHRM, // Chrome
+  APP_MSIC, // Music
+
+  // Diagonal mouse movement
+  A_MUL,
+  A_MUR,
+  A_MDL,
+  A_MDR,
+
+  // Hungarian layer keys
+  HU_AA, // Á
+  HU_OO, // Ó
+  HU_EE, // É
+  HU_UU, // Ú
+  HU_II, // Í
+  HU_OE, // Ö
+  HU_UE, // Ü
+  HU_OEE, // Ő
+  HU_UEE, // Ű
+
+  // One-handed layout specials
+  OH_BSSPC,
+  OH_ENTSFT,
+  OH_BASE,
+  OH_LEFT,
+  OH_RIGHT,
+};
+
+/* Fn keys */
+
+enum {
+  F_BSE = 0,
+  F_HUN,
+  F_GUI,
+  F_SFT,
+  F_ALT,
+  F_CTRL
+};
+
+/* Custom keycodes */
+
+enum {
+  CT_CLN = 0,
+  CT_MNS,
+  CT_TA,
+};
+
+/* States & timers */
+
+uint16_t gui_timer = 0;
+
+uint16_t kf_timers[12];
+
+uint16_t oh_base_timer = 0;
+uint16_t oh_bsspc_timer = 0;
+uint16_t oh_entsft_timer = 0;
+
+#define OH_BLINK_INTERVAL 500
+
+uint8_t oh_left_blink = 0;
+uint16_t oh_left_blink_timer = 0;
+uint8_t oh_right_blink = 0;
+uint16_t oh_right_blink_timer = 0;
+
+#if KEYLOGGER_ENABLE
+bool log_enable = false;
+#endif
+
+bool time_travel = false;
+
+/* The Keymap */
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Keymap 0: Base Layer
+ *
+ * ,-----------------------------------------------------.           ,-----------------------------------------------------.
+ * |        `~ | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr |           | Apps | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10|       F11 |
+ * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
+ * | Next/Prev |   '  |   ,  |   .  |   P  |   Y  |   [  |           |  ]   |   F  |   G  |   C  |   R  |  L   | \         |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * | Tab/ARROW |   A  |   O  |   E  |   U  |   I  |------|           |------|   D  |   H  |   T  |   N  |  S   | = / Arrow |
+ * |-----------+------+------+------+------+------|   (  |           |  )   |------+------+------+------+------+-----------|
+ * | Play/Pause|   /  |   Q  |   J  |   K  |   X  |      |           |      |   B  |   M  |   W  |   V  |  Z   |      Stop |
+ * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
+ *     |       |      |      |      |   :  |                                       |   -  |      |      |      |       |
+ *     `-----------------------------------'                                       `-----------------------------------'
+ *                                         ,-------------.           ,-------------.
+ *                                         | LAlt | GUI  |           | MDIA | 1HND |
+ *                                  ,------|------|------|           |------+------+------.
+ *                                  |      |      | Ctrl |           | LEAD |      |      |
+ *                                  |Backsp|LShift|------|           |------| Enter| Space|
+ *                                  |      |      | ESC  |           | HUN  |      |      |
+ *                                  `--------------------'           `--------------------'
+ */
+[BASE] = KEYMAP(
+// left hand
+ KC_GRV             ,M(KF_1)     ,M(KF_2)     ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR)
+,M(A_MPN)           ,KC_QUOT     ,KC_COMM     ,KC_DOT ,KC_P   ,KC_Y   ,KC_LBRC
+,TD(CT_TA)          ,KC_A        ,KC_O        ,KC_E   ,KC_U   ,KC_I
+,KC_MPLY            ,KC_SLSH     ,KC_Q        ,KC_J   ,KC_K   ,KC_X   ,KC_LPRN
+,KC_NO              ,KC_NO       ,KC_NO       ,KC_NO  ,TD(CT_CLN)
+
+                                                            ,F(F_ALT),F(F_GUI)
+                                                                     ,F(F_CTRL)
+                                                    ,KC_BSPC,F(F_SFT),M(A_ESC)
+
+                                                                // right hand
+                                                               ,KC_APP    ,M(KF_6),M(KF_7)   ,M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11
+                                                               ,KC_RBRC   ,KC_F   ,KC_G      ,KC_C   ,KC_R    ,KC_L     ,KC_BSLS
+                                                                          ,KC_D   ,KC_H      ,KC_T   ,KC_N    ,KC_S     ,KC_EQL
+                                                               ,KC_RPRN   ,KC_B   ,KC_M      ,KC_W   ,KC_V    ,KC_Z     ,KC_MSTP
+                                                                                  ,TD(CT_MNS),KC_NO  ,KC_NO   ,KC_NO    ,KC_NO
+
+                                                               ,OSL(NMDIA),M(OH_LEFT)
+                                                               ,KC_LEAD
+                                                               ,F(F_HUN)  ,KC_ENT ,KC_SPC
+    ),
+
+/* Keymap 1: Adore layer
+ *
+ * ,-----------------------------------------------------.           ,-----------------------------------------------------.
+ * |        `~ | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr |           | Apps | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10|       F11 |
+ * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
+ * | Next/Prev |   ,  |   .  |   L  |   W  |   M  |   [  |           |  ]   |   F  |   H  |   C  |   P  |  Y   | \         |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * | Tab/Arrow |   A  |   O  |   E  |   I  |   U  |------|           |------|   D  |   R  |   T  |   N  |  S   | = / Arrow |
+ * |-----------+------+------+------+------+------|   (  |           |  )   |------+------+------+------+------+-----------|
+ * | Play/Pause|   /  |   Z  |   '  |   K  |   X  |      |           |      |   B  |   G  |   V  |   J  |  Q   |      Stop |
+ * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
+ *     |       |      |      |      |   :  |                                       |   -  |      |      |      |       |
+ *     `-----------------------------------'                                       `-----------------------------------'
+ *                                         ,-------------.           ,-------------.
+ *                                         | LAlt | GUI  |           | MDIA | 1HND |
+ *                                  ,------|------|------|           |------+------+------.
+ *                                  |      |      | Ctrl |           | LEAD |      |      |
+ *                                  |Backsp|LShift|------|           |------| Enter| Space|
+ *                                  |      |      | ESC  |           | HUN  |      |      |
+ *                                  `--------------------'           `--------------------'
+ */
+[ADORE] = KEYMAP(
+// left hand
+ KC_GRV             ,M(KF_1)     ,M(KF_2)     ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR)
+,M(A_MPN)           ,KC_COMM     ,KC_DOT      ,KC_L   ,KC_W   ,KC_M   ,KC_LBRC
+,TD(CT_TA)          ,KC_A        ,KC_O        ,KC_E   ,KC_I   ,KC_U
+,KC_MPLY            ,KC_SLSH     ,KC_Z        ,KC_QUOT,KC_K   ,KC_X   ,KC_LPRN
+,KC_NO              ,KC_NO       ,KC_NO       ,KC_NO  ,TD(CT_CLN)
+
+                                                            ,F(F_ALT),F(F_GUI)
+                                                                     ,F(F_CTRL)
+                                                    ,KC_BSPC,F(F_SFT),M(A_ESC)
+
+                                                                // right hand
+                                                               ,KC_APP    ,M(KF_6),M(KF_7)   ,M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11
+                                                               ,KC_RBRC   ,KC_F   ,KC_H      ,KC_C   ,KC_P    ,KC_Y     ,KC_BSLS
+                                                                          ,KC_D   ,KC_R      ,KC_T   ,KC_N    ,KC_S     ,KC_EQL
+                                                               ,KC_RPRN   ,KC_B   ,KC_G      ,KC_V   ,KC_J    ,KC_Q     ,KC_MSTP
+                                                                                  ,TD(CT_MNS),KC_NO  ,KC_NO   ,KC_NO    ,KC_NO
+
+                                                               ,OSL(NMDIA),M(OH_LEFT)
+                                                               ,KC_LEAD
+                                                               ,F(F_HUN)  ,KC_ENT ,KC_SPC
+    ),
+
+/* Keymap 2: Arrow layer
+ *
+ * ,-----------------------------------------------------.           ,-----------------------------------------------------.
+ * |           |      |      |      |      |      |      |           |      |      |      |      |      |      |           |
+ * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
+ * |           |      |      |      |      |      |      |           |      |      | Home |  Up  |  End |      |           |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * |           |      |      |      |      |      |------|           |------|      | Left | Down | Rght |      |           |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * |           |      |      |      |      |      |      |           |      |      |      |      |      |      |           |
+ * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
+ *      |      |      |      |      |      |                                       |      |      |      |      |      |
+ *      `----------------------------------'                                       `----------------------------------'
+ *                                         ,-------------.           ,-------------.
+ *                                         |      |      |           |      |      |
+ *                                  ,------|------|------|           |------+------+------.
+ *                                  |      |      |      |           |      |      |      |
+ *                                  |      |      |------|           |------| PgUp | PgDn |
+ *                                  |      |      |      |           |      |      |      |
+ *                                  `--------------------'           `--------------------'
+ */
+
+[ARRW] = KEYMAP(
+// left hand
+ KC_TRNS ,KC_TRNS    ,KC_TRNS   ,KC_TRNS    ,KC_TRNS    ,KC_TRNS    ,KC_TRNS
+,KC_TRNS ,KC_TRNS    ,KC_TRNS   ,KC_TRNS    ,KC_TRNS    ,KC_TRNS    ,KC_TRNS
+,KC_TRNS ,KC_TRNS    ,KC_TRNS   ,KC_TRNS    ,KC_TRNS    ,KC_TRNS
+,KC_TRNS ,KC_TRNS    ,KC_TRNS   ,KC_TRNS    ,KC_TRNS    ,KC_TRNS    ,KC_TRNS
+,KC_TRNS ,KC_TRNS    ,KC_TRNS   ,KC_TRNS    ,KC_TRNS
+
+                                             ,KC_TRNS ,KC_TRNS
+                                                      ,KC_TRNS
+                                    ,KC_TRNS ,KC_TRNS ,KC_TRNS
+
+                                                                // right hand
+                                                               ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
+                                                               ,KC_TRNS ,KC_TRNS ,KC_HOME ,KC_UP   ,KC_END  ,KC_TRNS ,KC_TRNS
+                                                                        ,KC_TRNS ,KC_LEFT ,KC_DOWN ,KC_RGHT ,KC_TRNS ,KC_TRNS
+                                                               ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
+                                                                                 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
+
+                                                               ,KC_TRNS ,KC_TRNS
+                                                               ,KC_TRNS
+                                                               ,KC_TRNS ,KC_PGUP ,KC_PGDN
+    ),
+
+/* Keymap 3: Application select layer
+ *
+ * ,-----------------------------------------------------.           ,-----------------------------------------------------.
+ * |           |Music |Slack |Emacs |Term  |Chrome|      |           |      |      |      |      |      |      |           |
+ * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
+ * |           |      |      |      |      |      |      |           |      |      |      |      |      |      |           |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * |           |      |      |      |      |      |------|           |------|      |      |      |      |      |           |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * |           |      |      |      |      |      |      |           |      |      |      |      |      |      |           |
+ * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
+ *      |      |      |      |      |      |                                       |      |      |      |      |      |
+ *      `----------------------------------'                                       `----------------------------------'
+ *                                         ,-------------.           ,-------------.
+ *                                         |      |      |           |      |      |
+ *                                  ,------|------|------|           |------+------+------.
+ *                                  |      |      |      |           |      |      |      |
+ *                                  |      |      |------|           |------|      |      |
+ *                                  |      |      |      |           |      |      |      |
+ *                                  `--------------------'           `--------------------'
+ */
+
+[APPSEL] = KEYMAP(
+// left hand
+ KC_TRNS ,M(APP_MSIC),M(APP_SLK),M(APP_EMCS),M(APP_TERM),M(APP_CHRM),KC_TRNS
+,KC_TRNS ,KC_TRNS    ,KC_TRNS   ,KC_TRNS    ,KC_TRNS    ,KC_TRNS    ,KC_TRNS
+,KC_TRNS ,KC_TRNS    ,KC_TRNS   ,KC_TRNS    ,KC_TRNS    ,KC_TRNS
+,KC_TRNS ,KC_TRNS    ,KC_TRNS   ,KC_TRNS    ,KC_TRNS    ,KC_TRNS    ,KC_TRNS
+,KC_TRNS ,KC_TRNS    ,KC_TRNS   ,KC_TRNS    ,KC_TRNS
+
+                                             ,KC_TRNS ,KC_TRNS
+                                                      ,KC_TRNS
+                                    ,KC_TRNS ,KC_TRNS ,KC_TRNS
+
+                                                                // right hand
+                                                               ,KC_TRNS ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_TRNS
+                                                               ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
+                                                                        ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
+                                                               ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
+                                                                                 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
+
+                                                               ,KC_TRNS ,KC_TRNS
+                                                               ,KC_TRNS
+                                                               ,KC_TRNS ,KC_TRNS  ,KC_TRNS
+    ),
+
+
+/* Keymap 4: Hungarian Layer
+ *
+ * ,-----------------------------------------------------.           ,-----------------------------------------------------.
+ * |           |      |      |      |      |      |      |           |      |      |      |      |      |      |           |
+ * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
+ * |           |      |  Ő   |      |  Ű   |      |      |           |      |      |      |      |      |      |           |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * |           |   Á  |  Ó   |  É   |  Ú   |  Í   |------|           |------|      |      |      |      |      |           |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * |           |      |  Ö   |      |  Ü   |      |      |           |      |      |      |      |      |      |           |
+ * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
+ *      |      |      |      |      |      |                                       |      |      |      |      |      |
+ *      `----------------------------------'                                       `----------------------------------'
+ *                                         ,-------------.           ,-------------.
+ *                                         |      |      |           |      |      |
+ *                                  ,------|------|------|           |------+------+------.
+ *                                  |      |      |      |           |      |      |      |
+ *                                  |      |      |------|           |------|      |      |
+ *                                  |      |      |      |           | BASE |      |      |
+ *                                  `--------------------'           `--------------------'
+ */
+
+[HUN] = KEYMAP(
+// left hand
+ KC_NO   ,KC_NO   ,KC_NO    ,KC_NO   ,KC_NO    ,KC_NO   ,KC_NO
+,KC_NO   ,KC_NO   ,M(HU_OEE),KC_NO   ,M(HU_UEE),KC_NO   ,KC_NO
+,KC_NO   ,M(HU_AA),M(HU_OO) ,M(HU_EE),M(HU_UU) ,M(HU_II)
+,KC_NO   ,KC_NO   ,M(HU_OE) ,KC_NO   ,M(HU_UE) ,KC_NO   ,KC_NO
+,KC_NO   ,KC_NO   ,KC_NO    ,KC_NO   ,KC_NO
+
+                                             ,KC_NO   ,KC_NO
+                                                      ,KC_NO
+                                    ,KC_NO   ,KC_TRNS ,KC_TRNS
+
+                                                                // right hand
+                                                               ,KC_TRNS ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO
+                                                               ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO
+                                                                        ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO
+                                                               ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO
+                                                                                 ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO
+
+                                                               ,KC_NO   ,KC_NO
+                                                               ,KC_NO
+                                                               ,F(F_BSE),KC_TRNS  ,KC_TRNS
+    ),
+
+/* Keymap 5: Navigation & Media layer
+ *
+ * ,-----------------------------------------------------.           ,-----------------------------------------------------.
+ * | MS Slow   |      |      |      |      |      |ScrLCK|           |ScrLCK|      |      |      |      |      |           |
+ * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
+ * | MS Normal |      | Home |  Up  | PgUp |      |      |           |Scroll|      |MsUpL | MsUp |MsUpR |      |PrintScreen|
+ * |-----------+------+------+------+------+------|      |           |  Up  |------+------+------+------+------+-----------|
+ * | MS Fast   |      | Left | Down | Right|      |------|           |------|      |MsLeft| MsDn |MsRght|      |           |
+ * |-----------+------+------+------+------+------|      |           |Scroll|------+------+------+------+------+-----------|
+ * | Play/Pause|      | End  | Down | PgDn |      |      |           | Down |      |MsDnL | MsDn |MsDnR |      |      Stop |
+ * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
+ *      |      |      |      |      |      |                                       |      |      |      |      |      |
+ *      `----------------------------------'                                       `----------------------------------'
+ *                                         ,-------------.           ,-------------.
+ *                                         | Mute | VlUp |           | BASE | MClk |
+ *                                  ,------|------|------|           |------+------+------.
+ *                                  |      |      | VlDn |           | Prev |Left  |Right |
+ *                                  |  SPC | Enter|------|           |------| Click| Click|
+ *                                  |      |      | ESC  |           | Next |      |      |
+ *                                  `--------------------'           `--------------------'
+ */
+[NMDIA] = KEYMAP(
+// left hand
+ KC_ACL0    ,KC_NO       ,KC_NO      ,KC_NO   ,KC_NO   ,KC_NO   ,LGUI(KC_L)
+,KC_ACL1    ,KC_NO       ,KC_HOME    ,KC_UP   ,KC_PGUP ,KC_NO   ,KC_NO
+,KC_ACL2    ,KC_NO       ,KC_LEFT    ,KC_DOWN ,KC_RIGHT,KC_NO
+,KC_MPLY    ,KC_NO       ,KC_END     ,KC_DOWN ,KC_PGDN ,KC_NO   ,KC_NO
+,KC_NO      ,KC_NO       ,KC_NO      ,KC_NO   ,KC_NO
+                                                        ,KC_MUTE ,KC_VOLU
+                                                                 ,KC_VOLD
+                                                 ,KC_SPC,KC_ENTER,M(A_ESC)
+
+                                                                     // right hand
+                                                                     ,LGUI(KC_L),KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO    ,KC_NO
+                                                                     ,KC_WH_U   ,KC_NO   ,M(A_MUL),KC_MS_U ,M(A_MUR),KC_NO    ,KC_PSCR
+                                                                                ,KC_NO   ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_NO    ,KC_NO
+                                                                     ,KC_WH_D   ,KC_NO   ,M(A_MDL),KC_MS_D ,M(A_MDR),KC_NO    ,KC_MSTP
+                                                                                         ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO    ,KC_NO
+
+                                                                     ,KC_TRNS   ,KC_MS_BTN3
+                                                                     ,KC_MPRV
+                                                                     ,KC_MNXT   ,KC_BTN1 ,KC_BTN2
+    ),
+
+/* Keymap 6: One-handed, left side
+ *
+ * ,-----------------------------------------------------.
+ * |        `~ | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 |A  BSE|
+ * |-----------+------+------+------+------+-------------|
+ * |       Tab |   '  |   ,  |   .  |   P  |   Y  |   [  |
+ * |-----------+------+------+------+------+------|      |
+ * |         - |   A  |   O  |   E  |   U  |   I  |------|
+ * |-----------+------+------+------+------+------|   (  |
+ * | Play/Pause|   ;  |   Q  |   J  |   K  |   X  |      |
+ * `-----------+------+------+------+------+-------------'
+ *     |  Home | End  | Down |  Up  | ESC  |
+ *     `-----------------------------------'
+ *                                         ,-------------.
+ *                                         | LAlt | GUI  |
+ *                                  ,------|------|------|
+ *                                  |BackSp|LShift| Ctrl |
+ *                                  |      |      |------|
+ *                                  |Space |Enter |OTHER |
+ *                                  `--------------------'
+ */
+[OHLFT] = KEYMAP(
+// left hand
+ KC_GRV     ,M(KF_1)     ,M(KF_2)     ,M(KF_3)   ,M(KF_4)    ,M(KF_5) ,M(OH_BASE)
+,KC_TAB     ,KC_QUOT     ,KC_COMM     ,KC_DOT    ,KC_P       ,KC_Y    ,KC_LBRC
+,KC_MINS    ,KC_A        ,KC_O        ,KC_E      ,KC_U       ,KC_I
+,KC_MPLY    ,KC_SCLN     ,KC_Q        ,KC_J      ,KC_K       ,KC_X    ,KC_LPRN
+,KC_HOME    ,KC_END      ,KC_DOWN     ,KC_UP     ,M(A_ESC)
+
+                                                                ,KC_TRNS     ,KC_TRNS
+                                                                             ,KC_TRNS
+                                                    ,M(OH_BSSPC),M(OH_ENTSFT),M(OH_RIGHT)
+
+                                                                // right hand
+                                                               ,KC_NO   ,KC_NO  ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
+                                                               ,KC_NO   ,KC_NO  ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
+                                                                        ,KC_NO  ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
+                                                               ,KC_NO   ,KC_NO  ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
+                                                                                ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
+
+                                                               ,KC_NO   ,KC_NO
+                                                               ,KC_NO
+                                                               ,KC_NO   ,KC_NO  ,KC_NO
+    ),
+
+/* Keymap 7: One-handed, right side
+ *
+ * ,-----------------------------------------------------.
+ * | =     F11 | 0 F10| 9 F9 | 8 F8 | 7 F7 | 6 F6 |A  BSE|
+ * |-----------+------+------+------+------+-------------|
+ * |         / |   L  |   R  |   C  |   G  |   F  |   ]  |
+ * |-----------+------+------+------+------+------|      |
+ * |         \ |   S  |   N  |   T  |   H  |   D  |------|
+ * |-----------+------+------+------+------+------|   )  |
+ * |      Stop |   Z  |   V  |   W  |   M  |   B  |      |
+ * `-----------+------+------+------+------+-------------'
+ *     |  PgDn | PgUp | Right| Left | ESC  |
+ *     `-----------------------------------'
+ *                                         ,-------------.
+ *                                         | LAlt | GUI  |
+ *                                  ,------|------|------|
+ *                                  |BackSp|LShift| Ctrl |
+ *                                  |      |      |------|
+ *                                  |Space |Enter |OTHER |
+ *                                  `--------------------'
+ */
+[OHRGT] = KEYMAP(
+// left hand
+ M(KF_11)   ,M(KF_10)    ,M(KF_9)     ,M(KF_8)   ,M(KF_7)    ,M(KF_6) ,M(OH_BASE)
+,KC_SLSH    ,KC_L        ,KC_R        ,KC_C      ,KC_G       ,KC_F    ,KC_RBRC
+,KC_BSLS    ,KC_S        ,KC_N        ,KC_T      ,KC_H       ,KC_D
+,KC_MSTP    ,KC_Z        ,KC_V        ,KC_W      ,KC_M       ,KC_B    ,KC_RPRN
+,KC_PGDN    ,KC_PGUP     ,KC_RGHT     ,KC_LEFT   ,M(A_ESC)
+
+                                                                ,KC_TRNS     ,KC_TRNS
+                                                                             ,KC_TRNS
+                                                    ,M(OH_BSSPC),M(OH_ENTSFT),M(OH_LEFT)
+
+                                                                // right hand
+                                                               ,KC_NO   ,KC_NO  ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
+                                                               ,KC_NO   ,KC_NO  ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
+                                                                        ,KC_NO  ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
+                                                               ,KC_NO   ,KC_NO  ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
+                                                                                ,KC_NO  ,KC_NO  ,KC_NO       ,KC_NO       ,KC_NO
+
+                                                               ,KC_NO   ,KC_NO
+                                                               ,KC_NO
+                                                               ,KC_NO   ,KC_NO  ,KC_NO
+    ),
+
+/* Keymap 8: Steno for Plover
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |        |      |      |      |      |      | BASE |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |   #  |   #  |   #  |   #  |   #  |   #  |           |  #   |  #   |  #   |   #  |   #  |  #   |   #    |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |   T  |   P  |   H  |      |------|           |------|      |  F   |   P  |   L  |  T   |   D    |
+ * |--------+   S  +------+------+------+   *  |   *  |           |  *   |  *   +------+------+------+------+--------|
+ * |        |      |   K  |   W  |   R  |      |      |           |      |      |  R   |   B  |   G  |  S   |   Z    |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |      |      |      |                                       |      |      |      |      |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        |      |      |       |      |      |
+ *                                 ,------|------|------|       |------+------+------.
+ *                                 |      |      |      |       |      |      |      |
+ *                                 |   A  |   O  |------|       |------|  E   |  U   |
+ *                                 |      |      |      |       |      |      |      |
+ *                                 `--------------------'       `--------------------'
+ */
+
+[PLVR] = KEYMAP(
+// left hand
+KC_NO,  KC_NO,  KC_NO,  KC_NO,   KC_NO,  KC_NO,   M(A_PLVR),
+KC_NO,  PV_NUM, PV_NUM, PV_NUM,  PV_NUM, PV_NUM,  PV_NUM,
+KC_NO,  PV_LS,  PV_LT,  PV_LP,   PV_LH,  PV_STAR,
+KC_NO,  PV_LS,  PV_LK,  PV_LW,   PV_LR,  PV_STAR, PV_STAR,
+KC_NO,  KC_NO,  KC_NO,  KC_NO,   KC_NO,
+                                           KC_NO, KC_NO,
+                                           KC_NO,
+                                           PV_A,  PV_O,  KC_NO,
+
+                                                 // right hand
+                                                 KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_NO,
+                                                 PV_NUM,  PV_NUM,  PV_NUM,  PV_NUM,  PV_NUM,  PV_NUM,  PV_NUM,
+                                                          PV_STAR, PV_RF,   PV_RP,   PV_RL,   PV_RT,   PV_RD,
+                                                 PV_STAR, PV_STAR, PV_RR,   PV_RB,   PV_RG,   PV_RS,   PV_RZ,
+                                                                   KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_NO,
+                                           KC_NO,      KC_NO,
+                                           KC_NO,
+                                           KC_NO,PV_E, PV_U
+ ),
+
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+   [F_BSE]  = ACTION_LAYER_CLEAR(ON_PRESS)
+  ,[F_HUN]  = ACTION_LAYER_INVERT(HUN, ON_PRESS)
+  ,[F_GUI]  = ACTION_MACRO_TAP(A_GUI)
+  ,[F_SFT]  = ACTION_MODS_ONESHOT (MOD_LSFT)
+  ,[F_ALT]  = ACTION_MODS_ONESHOT (MOD_LALT)
+  ,[F_CTRL] = ACTION_MODS_ONESHOT (MOD_LCTL)
+};
+
+void toggle_steno(int pressed)
+{
+  uint8_t layer = biton32(layer_state);
+
+  if (pressed) {
+    if (layer != PLVR) layer_on(PLVR); else layer_off(PLVR);
+
+    register_code(PV_LP);
+    register_code(PV_LH);
+    register_code(PV_LR);
+    register_code(PV_O);
+    register_code(PV_RL);
+    register_code(PV_RG);
+  } else {
+    unregister_code(PV_LP);
+    unregister_code(PV_LH);
+    unregister_code(PV_LR);
+    unregister_code(PV_O);
+    unregister_code(PV_RL);
+    unregister_code(PV_RG);
+  }
+}
+
+macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_char)
+{
+  uint8_t need_shift = 0;
+  uint8_t hold_shift = 0;
+
+  if (!record->event.pressed)
+    return MACRO_NONE;
+
+  layer_off (HUN);
+
+  if (keyboard_report->mods & MOD_BIT (KC_LSFT)) {
+    hold_shift = 1;
+    need_shift = 1;
+    unregister_code (KC_LSFT);
+  }
+  if ((get_oneshot_mods () & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out ()) {
+    need_shift = 1;
+    hold_shift = 0;
+    unregister_code (KC_LSFT);
+  }
+
+  clear_oneshot_mods ();
+
+  register_code (KC_RALT);
+  unregister_code (KC_RALT);
+  if (accent == (KC_DQT)) {
+    register_code (KC_RSFT);
+  }
+  register_code (accent);
+  unregister_code (accent);
+  if (need_shift && accent != (KC_DQT)) {
+    register_code (KC_RSFT);
+  } else if (accent == (KC_DQT) && !need_shift) {
+    unregister_code (KC_RSFT);
+  }
+  register_code (hun_char);
+  unregister_code (hun_char);
+  if (need_shift || accent == (KC_DQT))
+    unregister_code (KC_RSFT);
+  if (hold_shift)
+    register_code (KC_LSFT);
+
+  return MACRO_NONE;
+}
+
+void ang_handle_kf (keyrecord_t *record, uint8_t id)
+{
+  uint8_t code = id - KF_1;
+
+  if (record->event.pressed) {
+    kf_timers[code] = timer_read ();
+  } else {
+    uint8_t kc;
+
+    if (timer_elapsed (kf_timers[code]) > TAPPING_TERM) {
+      // Long press
+      kc = KC_F1 + code;
+    } else {
+      if (id == KF_11)
+        kc = KC_EQL;
+      else
+        kc = KC_1 + code;
+    }
+
+    register_code (kc);
+    unregister_code (kc);
+  }
+}
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+      switch(id) {
+      case A_ESC:
+        if (record->event.pressed) {
+          if ((get_oneshot_mods ()) && !has_oneshot_mods_timed_out ()) {
+            clear_oneshot_mods ();
+          } else {
+            register_code (KC_ESC);
+          }
+          layer_off (HUN);
+        } else {
+          unregister_code (KC_ESC);
+        }
+        break;
+
+      case A_MPN:
+        if (record->event.pressed) {
+          if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
+              ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) {
+            int oneshot = ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out());
+
+            if (oneshot)
+              clear_oneshot_mods ();
+            unregister_code (KC_LSFT);
+
+            register_code (KC_MPRV);
+            unregister_code (KC_MPRV);
+
+            if (!oneshot)
+              register_code (KC_LSFT);
+          } else {
+            return MACRO (T(MNXT), END);
+          }
+        }
+        break;
+
+        /* Hungarian layer */
+      case HU_AA:
+        return ang_do_hun (record, KC_QUOT, KC_A);
+      case HU_OO:
+        return ang_do_hun (record, KC_QUOT, KC_O);
+      case HU_EE:
+        return ang_do_hun (record, KC_QUOT, KC_E);
+      case HU_UU:
+        return ang_do_hun (record, KC_QUOT, KC_U);
+      case HU_II:
+        return ang_do_hun (record, KC_QUOT, KC_I);
+      case HU_OE:
+        return ang_do_hun (record, KC_DQT, KC_O);
+      case HU_UE:
+        return ang_do_hun (record, KC_DQT, KC_U);
+      case HU_OEE:
+        return ang_do_hun (record, KC_EQL, KC_O);
+      case HU_UEE:
+        return ang_do_hun (record, KC_EQL, KC_U);
+
+        /* Mouse movement */
+      case A_MUL:
+        if (record->event.pressed) {
+          mousekey_on(KC_MS_UP);
+          mousekey_on(KC_MS_LEFT);
+        } else {
+          mousekey_off(KC_MS_UP);
+          mousekey_off(KC_MS_LEFT);
+        }
+        mousekey_send();
+        break;
+
+      case A_MUR:
+        if (record->event.pressed) {
+          mousekey_on(KC_MS_UP);
+          mousekey_on(KC_MS_RIGHT);
+        } else {
+          mousekey_off(KC_MS_UP);
+          mousekey_off(KC_MS_RIGHT);
+        }
+        mousekey_send();
+        break;
+
+      case A_MDL:
+        if (record->event.pressed) {
+          mousekey_on(KC_MS_DOWN);
+          mousekey_on(KC_MS_LEFT);
+        } else {
+          mousekey_off(KC_MS_DOWN);
+          mousekey_off(KC_MS_LEFT);
+        }
+        mousekey_send();
+        break;
+
+      case A_MDR:
+        if (record->event.pressed) {
+          mousekey_on(KC_MS_DOWN);
+          mousekey_on(KC_MS_RIGHT);
+        } else {
+          mousekey_off(KC_MS_DOWN);
+          mousekey_off(KC_MS_RIGHT);
+        }
+        mousekey_send();
+        break;
+
+        /* Plover base */
+      case A_PLVR:
+        toggle_steno(record->event.pressed);
+        break;
+
+        /* GUI & AppSel */
+      case A_GUI:
+        if (record->event.pressed) {
+          register_code (KC_LGUI);
+          if (record->tap.count && !record->tap.interrupted) {
+            if (record->tap.count >= 2) {
+              register_code (KC_W);
+              layer_on (APPSEL);
+              set_oneshot_layer (APPSEL, ONESHOT_START);
+            }
+          } else {
+            record->tap.count = 0;
+          }
+          gui_timer = 0;
+        } else {
+          if (record->tap.count >= 2)
+            {
+              unregister_code (KC_W);
+              clear_oneshot_layer_state (ONESHOT_PRESSED);
+            }
+          gui_timer = timer_read ();
+        }
+        break;
+
+      case APP_SLK:
+        return MACRODOWN(T(S), T(L), T(A), T(C), T(K), T(ENT), END);
+
+      case APP_EMCS:
+        return MACRODOWN(T(E), T(M), T(A), T(C), T(S), T(ENT), END);
+
+      case APP_TERM:
+        return MACRODOWN(T(T), T(E), T(R), T(M), T(ENT), END);
+
+      case APP_CHRM:
+        return MACRODOWN(T(C), T(H), T(R), T(O), T(M), T(ENT), END);
+
+      case APP_MSIC:
+        return MACRODOWN(T(R), T(H), T(Y), T(T), T(H), T(M), T(B), T(O), T(X), T(ENT), END);
+
+        /* Function keys */
+      case KF_1 ... KF_11:
+        ang_handle_kf (record, id);
+        break;
+
+        /* 1HAND layout */
+      case OH_BASE:
+        if (record->event.pressed) {
+          oh_base_timer = timer_read ();
+        } else {
+          if (timer_elapsed (oh_base_timer) > TAPPING_TERM) {
+            layer_clear ();
+          } else {
+            return MACRO (T(APP), END);
+          }
+        }
+        break;
+
+      case OH_BSSPC:
+        if (record->event.pressed) {
+          oh_bsspc_timer = timer_read ();
+        } else {
+          if (timer_elapsed (oh_bsspc_timer) > TAPPING_TERM) {
+            return MACRO (T(BSPC), END);
+          } else {
+            return MACRO (T(SPC), END);
+          }
+        }
+        break;
+
+      case OH_ENTSFT:
+        if (record->event.pressed) {
+          oh_entsft_timer = timer_read ();
+        } else {
+          if (timer_elapsed (oh_entsft_timer) > TAPPING_TERM) {
+            if (keyboard_report->mods & MOD_BIT(KC_LSFT))
+              unregister_code (KC_LSFT);
+            else
+              register_code (KC_LSFT);
+          } else {
+            return MACRO (T(ENT), END);
+          }
+        }
+        break;
+
+      case OH_LEFT:
+        if (record->event.pressed) {
+          layer_move (OHLFT);
+          oh_left_blink = 1;
+          oh_left_blink_timer = timer_read ();
+          ergodox_right_led_1_on ();
+        }
+        break;
+
+      case OH_RIGHT:
+        if (record->event.pressed) {
+          layer_move (OHRGT);
+          oh_right_blink = 1;
+          oh_right_blink_timer = timer_read ();
+          ergodox_right_led_3_on ();
+        }
+        break;
+      }
+      return MACRO_NONE;
+};
+
+uint8_t is_adore = 0;
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+  uint8_t dl;
+
+  ergodox_led_all_on();
+  for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) {
+    ergodox_led_all_set (i);
+    wait_ms (5);
+  }
+  wait_ms(1000);
+  for (int i = LED_BRIGHTNESS_LO; i > 0; i--) {
+    ergodox_led_all_set (i);
+    wait_ms (10);
+  }
+  ergodox_led_all_off();
+
+  if (!eeconfig_is_enabled())
+    eeconfig_init();
+  dl = eeconfig_read_default_layer ();
+  if (dl == (1UL << ADORE))
+    is_adore = 1;
+};
+
+LEADER_EXTERNS();
+
+void ang_do_unicode (void) {
+  register_code (KC_RCTL);
+  register_code (KC_RSFT);
+  register_code (KC_U);
+  unregister_code (KC_U);
+  unregister_code (KC_RSFT);
+  unregister_code (KC_RCTL);
+  wait_ms (100);
+}
+
+void ang_tap (uint16_t codes[]) {
+  for (int i = 0; codes[i] != 0; i++) {
+    register_code (codes[i]);
+    unregister_code (codes[i]);
+    wait_ms (50);
+  }
+}
+
+#define TAP_ONCE(code) \
+  register_code (code); \
+  unregister_code (code)
+
+void ang_tap_dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) {
+  if (state->count == 1) {
+    register_code (KC_RSFT);
+    register_code (KC_SCLN);
+  } else if (state->count == 2) {
+    register_code (KC_SCLN);
+  }
+}
+
+void ang_tap_dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) {
+  if (state->count == 1) {
+    unregister_code (KC_SCLN);
+    unregister_code (KC_RSFT);
+  } else if (state->count == 2) {
+    unregister_code (KC_SCLN);
+  }
+}
+
+void ang_tap_dance_mns_finished (qk_tap_dance_state_t *state, void *user_data) {
+  if (state->count == 1) {
+    register_code (KC_MINS);
+  } else if (state->count == 2) {
+    register_code (KC_RSFT);
+    register_code (KC_MINS);
+  }
+}
+
+void ang_tap_dance_mns_reset (qk_tap_dance_state_t *state, void *user_data) {
+  if (state->count == 1) {
+    unregister_code (KC_MINS);
+  } else if (state->count == 2) {
+    unregister_code (KC_RSFT);
+    unregister_code (KC_MINS);
+  }
+}
+
+typedef struct {
+  bool layer_toggle;
+  bool sticky;
+  bool finished_once;
+} td_ta_state_t;
+
+void ang_tap_dance_ta_finished (qk_tap_dance_state_t *state, void *user_data) {
+  td_ta_state_t *td_ta = (td_ta_state_t *) user_data;
+
+  if (td_ta->finished_once) {
+    return;
+  }
+
+  if (td_ta->sticky) {
+    td_ta->sticky = false;
+    td_ta->layer_toggle = false;
+    layer_off (ARRW);
+    return;
+  }
+
+  td_ta->finished_once = true;
+  if (state->count == 1 && !state->pressed) {
+    register_code (KC_TAB);
+    td_ta->sticky = false;
+    td_ta->layer_toggle = false;
+  } else {
+    td_ta->layer_toggle = true;
+    layer_on (ARRW);
+    td_ta->sticky = (state->count == 2);
+  }
+}
+
+void ang_tap_dance_ta_reset (qk_tap_dance_state_t *state, void *user_data) {
+  td_ta_state_t *td_ta = (td_ta_state_t *) user_data;
+
+  if (!td_ta->layer_toggle)
+    unregister_code (KC_TAB);
+  if (!td_ta->sticky)
+    layer_off (ARRW);
+
+  td_ta->finished_once = false;
+}
+
+const qk_tap_dance_action_t tap_dance_actions[] = {
+   [CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, ang_tap_dance_cln_finished, ang_tap_dance_cln_reset)
+  ,[CT_MNS] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, ang_tap_dance_mns_finished, ang_tap_dance_mns_reset)
+  ,[CT_TA]  = {
+     .fn = { NULL, ang_tap_dance_ta_finished, ang_tap_dance_ta_reset },
+     .user_data = (void *)&((td_ta_state_t) { false, false, false })
+   }
+};
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+  uint8_t layer = biton32(layer_state);
+
+  if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM)
+    unregister_code (KC_LGUI);
+
+  if (layer != OHLFT)
+    oh_left_blink = 0;
+  if (layer != OHRGT)
+    oh_right_blink = 0;
+
+  if (layer == HUN) {
+    ergodox_right_led_2_on();
+    ergodox_right_led_3_on();
+  } else if (layer == NMDIA) {
+    ergodox_right_led_1_on();
+    ergodox_right_led_2_on();
+  } else if (layer == PLVR) {
+    ergodox_right_led_1_on ();
+    ergodox_right_led_2_on ();
+    ergodox_right_led_3_on ();
+  } else if (layer == ADORE) {
+    ergodox_right_led_1_on ();
+    ergodox_right_led_2_on ();
+    ergodox_right_led_3_on ();
+
+    ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
+  }
+
+  if (layer == OHLFT || layer == OHRGT) {
+    ergodox_right_led_2_on();
+
+    if (oh_left_blink) {
+      if (timer_elapsed (oh_left_blink_timer) > OH_BLINK_INTERVAL) {
+        if ((keyboard_report->mods & MOD_BIT(KC_LSFT)) == 0)
+          ergodox_right_led_1_off ();
+      }
+      if (timer_elapsed (oh_left_blink_timer) > OH_BLINK_INTERVAL * 2) {
+        ergodox_right_led_1_on ();
+        oh_left_blink_timer = timer_read ();
+      }
+    }
+
+    if (oh_right_blink) {
+      if (timer_elapsed (oh_right_blink_timer) > OH_BLINK_INTERVAL) {
+        if ((keyboard_report->mods & MOD_BIT(KC_LCTRL)) == 0)
+          ergodox_right_led_3_off ();
+      }
+      if (timer_elapsed (oh_right_blink_timer) > OH_BLINK_INTERVAL * 2) {
+        ergodox_right_led_3_on ();
+        oh_right_blink_timer = timer_read ();
+      }
+    }
+  }
+
+  if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
+      ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) {
+    ergodox_right_led_1_set (LED_BRIGHTNESS_HI);
+    ergodox_right_led_1_on ();
+  } else {
+    ergodox_right_led_1_set (LED_BRIGHTNESS_LO);
+    if (layer != OHLFT && layer != NMDIA && layer != PLVR && layer != ADORE)
+      ergodox_right_led_1_off ();
+  }
+
+  if (keyboard_report->mods & MOD_BIT(KC_LALT) ||
+      ((get_oneshot_mods() & MOD_BIT(KC_LALT)) && !has_oneshot_mods_timed_out())) {
+    ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
+    ergodox_right_led_2_on ();
+  } else {
+    ergodox_right_led_2_set (LED_BRIGHTNESS_LO);
+    if (layer != OHRGT && layer != HUN && layer != OHLFT && layer != NMDIA && layer != PLVR && layer != ADORE)
+      ergodox_right_led_2_off ();
+  }
+
+  if (keyboard_report->mods & MOD_BIT(KC_LCTRL) ||
+      ((get_oneshot_mods() & MOD_BIT(KC_LCTRL)) && !has_oneshot_mods_timed_out())) {
+    ergodox_right_led_3_set (LED_BRIGHTNESS_HI);
+    ergodox_right_led_3_on ();
+  } else {
+    ergodox_right_led_3_set (LED_BRIGHTNESS_LO);
+    if (layer != OHRGT && layer != HUN && layer != PLVR && layer != ADORE)
+      ergodox_right_led_3_off ();
+  }
+
+  LEADER_DICTIONARY() {
+    leading = false;
+    leader_end ();
+
+#if KEYLOGGER_ENABLE
+    SEQ_ONE_KEY (KC_D) {
+      ergodox_led_all_on();
+      wait_ms(100);
+      ergodox_led_all_off();
+      log_enable = !log_enable;
+    }
+#endif
+
+    SEQ_ONE_KEY (KC_T) {
+      time_travel = !time_travel;
+    }
+
+    SEQ_ONE_KEY (KC_U) {
+      ang_do_unicode ();
+    }
+
+    SEQ_ONE_KEY (KC_V) {
+      SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ (" QMK_VERSION "/" KEYMAP_VERSION ")");
+    }
+
+    SEQ_ONE_KEY (KC_L) {
+      /* λ */
+      ang_do_unicode ();
+
+      uint16_t codes[] = {KC_0, KC_3, KC_B, KC_B, KC_ENT, 0};
+      ang_tap (codes);
+    }
+
+    SEQ_ONE_KEY (KC_Y) {
+      uint16_t codes[] = {KC_BSLS, KC_O, KC_SLSH, 0};
+      ang_tap (codes);
+    }
+
+    SEQ_ONE_KEY (KC_S) {
+      ang_do_unicode (); TAP_ONCE (KC_A); TAP_ONCE (KC_F); TAP_ONCE (KC_SPC);
+      TAP_ONCE (KC_BSLS);
+      register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT);
+      ang_do_unicode (); TAP_ONCE (KC_3); TAP_ONCE (KC_0); TAP_ONCE (KC_C); TAP_ONCE (KC_4); TAP_ONCE (KC_SPC);
+      register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT);
+      TAP_ONCE (KC_SLSH);
+      ang_do_unicode (); TAP_ONCE (KC_A); TAP_ONCE (KC_F); TAP_ONCE (KC_SPC);
+    }
+
+    SEQ_TWO_KEYS (KC_W, KC_M) {
+      register_code (KC_LALT);
+      register_code (KC_F2);
+      unregister_code (KC_F2);
+      unregister_code (KC_LALT);
+
+      wait_ms (1000);
+
+      uint16_t codes[] = {KC_M, KC_A, KC_X, KC_MINS, KC_F, KC_O, KC_C, KC_U, KC_S, KC_E, KC_D, KC_ENT, 0};
+      ang_tap (codes);
+      register_code (KC_LGUI);
+      register_code (KC_UP);
+      unregister_code (KC_UP);
+      unregister_code (KC_LGUI);
+    }
+
+    SEQ_ONE_KEY (KC_A) {
+      if (is_adore == 0) {
+        default_layer_and (0);
+        default_layer_or ((1UL << ADORE));
+        eeconfig_update_default_layer ((1UL << ADORE));
+        is_adore = 1;
+
+        ergodox_led_all_off ();
+        ergodox_right_led_3_on ();
+        wait_ms (100);
+        ergodox_right_led_2_on ();
+        wait_ms (100);
+        ergodox_right_led_3_off ();
+        ergodox_right_led_1_on ();
+        wait_ms (100);
+        ergodox_right_led_2_off ();
+        wait_ms (100);
+        ergodox_right_led_1_off ();
+      } else {
+        is_adore = 0;
+        default_layer_and (0);
+        default_layer_or (1UL << BASE);
+        eeconfig_update_default_layer ((1UL << BASE));
+
+        ergodox_led_all_off ();
+        ergodox_right_led_1_on ();
+        wait_ms (100);
+        ergodox_right_led_2_on ();
+        wait_ms (100);
+        ergodox_right_led_1_off ();
+        ergodox_right_led_3_on ();
+        wait_ms (100);
+        ergodox_right_led_2_off ();
+        wait_ms (100);
+        ergodox_right_led_3_off ();
+      }
+    }
+  }
+}
+
+static uint16_t last4[4];
+
+bool process_record_user (uint16_t keycode, keyrecord_t *record) {
+#if KEYLOGGER_ENABLE
+  uint8_t layer = biton32(layer_state);
+
+  if (log_enable && layer == BASE) {
+    xprintf ("KL: col=%d, row=%d\n", record->event.key.col,
+             record->event.key.row);
+  }
+#endif
+
+  if (time_travel && !record->event.pressed) {
+    uint8_t p;
+
+    // shift cache one to the left
+    for (p = 0; p < 3; p++) {
+      last4[p] = last4[p + 1];
+    }
+    last4[3] = keycode;
+
+    if (last4[0] == KC_D && last4[1] == KC_A && last4[2] == KC_T && last4[3] == KC_E) {
+      uint16_t codes[] = {KC_E, KC_SPC, KC_MINS, KC_D, KC_SPC, KC_QUOT, 0};
+      ang_tap (codes);
+      register_code (KC_RSFT);
+      register_code (KC_EQL);
+      unregister_code (KC_EQL);
+      unregister_code (KC_RSFT);
+
+      uint16_t codes2[] = {KC_4, KC_SPC, KC_D, KC_A, KC_Y, KC_S, KC_QUOT, 0};
+      ang_tap (codes2);
+
+      return false;
+    }
+  }
+
+  return true;
+}

+ 198 - 0
keyboards/ergodox/keymaps/algernon/readme.md

@@ -0,0 +1,198 @@
+<!-- -*- mode: markdown; fill-column: 8192 -*- -->
+
+algernon's layout
+=======================
+
+This is an unconventional layout for the ErgoDox EZ. For more details about the history of the layout, see my [blog posts about my ErgoDox journey][blog-ergodox].
+
+ [blog-ergodox]: https://asylum.madhouse-project.org/blog/tags/ergodox/
+
+Some of the things in the layout only work when one uses Spacemacs and GNOME under Linux. Your mileage may vary.
+
+## Table of Contents
+
+* [Layouts](#layouts)
+    - [Base layer](#base-layer)
+    - [ADORE layer](#adore-layer)
+    - [Hungarian layer](#hungarian-layer)
+    - [Navigation and media layer](#navigation-and-media-layer)
+    - [One-handed layer](#one-handed-layer)
+    - [Steno layer](#steno-layer)
+    - [LED states](#led-states)
+* [Tools](#tools)
+    - [Heatmap](#heatmap)
+* [Building](#building)
+    - [Using on Windows](#using-on-windows)
+* [Changelog](#changelog)
+* [License](#license)
+
+# Layouts
+
+## Base layer
+
+[![Base layer](images/base-layer.png)](http://www.keyboard-layout-editor.com/#/gists/28f7eb305fdbff943613e1dc7aa9e82b)
+
+At its core, this is a Dvorak layout, with some minor changes. The more interesting parts are how certain keys behave:
+
+* The keys on the number row double as function keys, when held for a bit longer than an usual tap. This allows me to use the function keys without having to switch layers.
+* The `Shift`, `Alt`, and `Control` modifiers are one-shot. When tapped, they are considered active for the next key press only. When double tapped, they toggle on, until a third, single tap sometime later. When held, they act as expected. My usual pattern is that I use these for the next keypress only, so this behaviour is perfect. If I need them held, I'll just double-tap.
+* The `GUI` key is special, because when I double-tap it, it sends `GUI + w`, which pops up an application selector. It also switches to a one-shot layer, where the number row on the left half turns into app selector macros, for the most common things I usually want to switch to. Otherwise it behaves as on a normal layout.
+* The `ESC` key also doubles as a one-shot cancel key: if tapped while any of the one-shot modifiers are in-flight (as in, single-tapped, and not expired yet), it cancels all one-shot modifiers. It also cancels the **Hun** layer, if active. Otherwise it sends the usual keycode.
+* The **Media** and **Hun** layer keys are one-shot, the **1Hand** and **STENO** keys are toggles.
+* When holding any of the **Arrow** layer keys, the arrow layer activates while the layer key is held. Tapping the key produces the normal key.
+* Tapping the `:` key once yields `:`, tapping it twice yields `;`.
+* The **Lead** key allows me to type in a sequence of keys, and trigger some actions:
+    - `LEAD u` enters unicode input mode, by sending the GTK+ key sequence that does this.
+    - `LEAD l` uses the unicode input method to enter a `λ`.
+    - `LEAD s` does a lot of magic to type in a shruggie: `¯\_(ツ)_/¯`
+    - `LEAD y` types `\o/`.
+    - `LEAD w m` maximises the currently focused window.
+    - `LEAD a` makes the [ADORE layer](#adore-layer) the default.
+    - `LEAD v` prints the firmware version, the keyboard and the keymap.
+    - `LEAD d` toggles logging keypress positions to the HID console.
+    - `LEAD t` toggles time travel. Figuring out the current `date` is left as an exercise to the reader.
+
+## ADORE layer
+
+[![ADORE layer](images/adore-layer.png)](http://www.keyboard-layout-editor.com/#/gists/45681a17453d235925b6028dd83bf12a)
+
+While using the standard Dvorak layout, I encountered a number of inconveniences, and on this layer, I am playing with ideas to make the layout feel better. Initially, it was based on [Capewell-Dvorak][cpd], but that too, had shortcomings I was not happy with. So now this is something inbetween, with own observations thrown in. How it works out in the long run remains to be seen.
+
+ [cpd]: http://www.michaelcapewell.com/projects/keyboard/layout_capewell-dvorak.htm
+ 
+Based on a week and a half of typing, the keys were rearranged, and the home row neatly spelled out **ADORE**, that gave the layout its name.
+
+## Hungarian layer
+
+[![Hungarian layer](images/hun-layer.png)](http://www.keyboard-layout-editor.com/#/gists/b160f6ec90d58c127c114c89f66e9dc9)
+
+On this layer, the accented characters are at the same position as their base variant. For some, which can have other diatribes, the long one is on top, short's on bottom. Tapping any of the accented characters takes us back to the base layer.
+
+## Navigation and media layer
+
+[![Navigation and media layer](images/nav-n-media-layer.png)](http://www.keyboard-layout-editor.com/#/gists/c59c453f9fe1a3238ba1494e7e5c6892)
+
+This layer is primarily for navigating with the cursor or the mouse, and some media things.
+
+## One-handed layer
+
+[![One-handed layer](images/one-handed-layer.png)](http://www.keyboard-layout-editor.com/#/gists/edff2495135955b8963198dace7f7ece)
+
+The one-handed layer is used in situations where the right hand is occupied, by mousing around, for example. Tapping the `OTHER` key switches which side is active. For the most part, keys remain in their usual position. When the right half is active, keys are mirrored to the left half.
+
+The differences are as follows:
+
+* The `ESC` key has been moved to the bottom row, so the `OTHER` key is easier to tap.
+* Most keys on the thumb cluster now have dual uses, and these do not change when switching sides:
+    - The `Space`/`Backspace` key sends `Space` on tap, `Backspace` when held for longer than a normal tap.
+    - The `Enter`/`Shift` key sends `Enter` on short-tap, `Shift` on long-tap.
+* The `Apps`/`BASE` key can be used to go back to the base layer, by long-tapping it. A short-tap will send the `App` key, as usual.
+
+## Steno layer
+
+[![Steno layer for Plover](images/steno-layer.png)](http://www.keyboard-layout-editor.com/#/gists/401ef9a84369e47c57f9aedcf0a0d667)
+
+This is to be used with [Plover](http://www.openstenoproject.org/plover/), nothing really fancy here. The **STENO** key toggles the layer on and off, and sends the toggle command to Plover too.
+
+## LED states
+
+The primary purpose of the LEDs is to show the modifier status, a secondary, to show which layer is active. Each modifier, `Shift`, `Alt` and `Control` each have their designated LEDs: the *red*, *green* and *blue*, respectively. When a modifier is in a one-shot state, the respective LED will turn on with a dimmer light. If the modifier is toggled on, the brightness of the LED turns full.
+
+For the layers, the following rules apply:
+
+* When the [ADORE layer](#adore-layer) is toggled on, LEDs will light up from left to right in a sequence, then turn off. When the layer is toggled off, the LEDs light up and turn off in the other direction. No LEDs are on while the layer is active.
+* When the [Hungarian layer](#hungarian-layer) is active, the *green* and *blue* LEDs are on.
+* When the [Navigation and media layer](#navigation-and-media-layer) is active, the *red* and *green* ones are on.
+* When the [One-handed layer](#one-handed-layer) is active, the *green* LED is on and bright, and either the *red* or the *blue* one is going to slowly blink, depending on the currently active side.
+* For the [Steno layer](#steno-layer), all LEDs will be turned on.
+
+Unless noted otherwise, the layers use a dim light for the LEDs, while modifiers use a stronger one, and modifiers override any layer preferences. For example, when on the one-handed layer, with the left side active (*red* light blinking), if `Shift` is on, the *red* light will be constantly on.
+
+# Tools
+
+## Heatmap
+
+When the keypress logging functionality is enabled (by `LEAD d`), the keyboard will output a line every time a key is pressed, containing the position of the key in the matrix. This allows one to collect this information, and build analytics over it, such as a heat map, including dead keys too.
+
+Included with the firmware is a small tool that can parse these logs, and create a heatmap that one can import into [KLE][kle]. To use it, simply point `tools/log-to-heatmap.py` to a base layout file (one is included in the `tools/` directory), and the key position log. The latter one can create by running `hid-listen`, and redirecting its output to a file.
+
+ [kle]: http://www.keyboard-layout-editor.com/
+
+The generated heatmap looks somewhat like this:
+
+ ![Heatmap](images/heatmap.png)
+
+# Building
+
+To make my workflow easier, this layout is maintained in [its own repository][algernon:ez-layout]. To build it, you will need the [QMK][qmk] firmware checked out, and this repo either checked out to something like `keyboards/ergodox_ez/algernon-master`. One way to achieve that is this:
+
+ [algernon:ez-layout]: https://github.com/algernon/ergodox-layout
+ [qmk]: https://github.com/jackhumbert/qmk_firmware
+
+```
+$ git clone https://github.com/jackhumbert/qmk_firmware.git
+$ cd qmk_firmware
+$ git clone https://github.com/algernon/ergodox-layout.git \
+            keyboards/ergodox_ez/keymaps/algernon-master
+$ make KEYBOARD=ergodox_ez KEYMAP=algernon-master
+```
+
+From time to time, updates may be submitted back to the QMK repository. If you are reading it there, you can build the firmware like any other firmware included with it (assuming you are in the root directory of the firmware):
+
+```
+$ make KEYBOARD=ergodox_ez KEYMAP=algernon
+```
+
+## Using on Windows
+
+The keymap default to forcing NKRO, which seems to upset Windows, and except the modifiers, none of them work. If you experience this problem, recompile the firmware with `FORCE_NKRO=no` added to the `make` command line.
+
+# Changelog
+
+## v1.4 - 2016-07-29
+
+* When toggling the key logging on or off, the LEDs will do a little dance.
+* The keylogger is now optional, but enabled by default. Use `KEYLOGGER_ENABLE=no` on the `make` command line to disable it.
+* The `TAB`/`ARRW` key was turned into a tap-dance key, allowing one to toggle the **ARROW** layer on by double-tapping, and as such, avoid the need to hold the key.
+* The `-`/`_` key was turned into a tap-dance key too.
+* There is now a way to travel time with the keyboard, toggle the feature on by hitting `LEAD t`.
+
+## v1.3 - 2016-07-06
+
+* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a [heatmap](#heatmap) out of the logs.
+* The arrow and navigation keys were rearranged again, and now require an additional key being held to activate. See the [base layer](#base-layer) for an image that shows where arrows are.
+* The **experimental** layer has been redone, and is now called [ADORE](#adore-layer), and as such, can be enabled by `LEAD a` now.
+* Switching between Dvorak and ADORE is now persisted into EEPROM, and survives a reboot.
+
+## v1.2 - 2016-06-22
+
+* The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with [certain operating systems](#using-on-windows).
+* The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted.
+* The `=` and `\` keys were swapped, `=` moved to the home row, on both the [base](#base-layer) and the **experimental** layers.
+* The arrow and navigation keys were redone, they are now more accessible, but the navigation keys require an extra tap to access.
+* The **Emacs** layer is gone, replaced by a simplified [navigation and media](#navigation-and-media-layer) layer.
+* `LEAD v` types the firmware version, and the keymap version.
+* On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped.
+* The [Steno](#steno-layer) layer gained a few more `#` and `*` keys, to make it easier on my fingers.
+
+## v1.1 - 2016-06-14
+
+* The keyboard starts in NKRO mode, bootmagic and other things are disabled.
+* A [Steno](#steno-layer) layer was added, to be used with Plover.
+* An **experimental** layer was added, something halfway between Dvorak and Capewell-Dvorak. A work in progress.
+* `LEAD y` types `\o/`.
+* Some keys on the [Base](#base-layer) layer have been moved around:
+    - `?` moved to the left pinky, left of `Q`.
+    - `=` shifted one row down, but `F11` stayed where it was.
+    - `-` on the left half was replaced by `Tab`.
+    - `Tab`'s original position is taken by a `Media Next`/`Media Prev` key.
+    - `:` now inputs `;` when shifted.
+* `ESC` cancels the [Hungarian](#hungarian-layer) layer too, not just modifiers.
+
+## v1.0 - 2016-05-26
+
+Initial version.
+
+# License
+
+The layout, being a derivative of the original TMK firmware which is under the GPL-2+, this layout is under the GPL as well, but GPL-3+, rather than the older version.

+ 533 - 0
keyboards/ergodox/keymaps/algernon/tools/heatmap-adore-layout.json

@@ -0,0 +1,533 @@
+[
+  {
+    "backcolor": "#ffffff",
+    "name": "ErgoDox - algernon's layout: Heatmap",
+    "author": "Gergely Nagy <kbd@gergo.csillger.hu>",
+    "notes": "See [here](https://github.com/algernon/ergodox-layout#readme) for the QMK keymap source.",
+    "switchMount": "cherry",
+    "switchBrand": "gateron",
+    "switchType": "KS-3-Tea",
+    "pcb": true,
+    "css": ".keyborder { -webkit-filter: blur(5px); filter: blur(5px); } .keytop { -webkit-filter: blur(10px); } .keylabels { border: 1px solid black; }"
+  },
+  [
+    {
+      "x": 3.5,
+      "c": "#a7d0db",
+      "fa": [
+        0,
+        0,
+        2
+      ]
+    },
+    "#\n3\nF3",
+    {
+      "x": 10.5,
+      "c": "#a7d0db",
+      "t": "#000000",
+      "a": 4,
+      "fa": [
+        0,
+        0,
+        2
+      ]
+    },
+    "*\n8\nF8"
+  ],
+  [
+    {
+      "y": -0.875,
+      "x": 2.5,
+      "c": "#bfbad1",
+      "t": "#0d0d0b"
+    },
+    "@\n2\nF2",
+    {
+      "x": 1,
+      "c": "#7adabd",
+      "t": "#000000"
+    },
+    "$\n4\nF4",
+    {
+      "x": 8.5
+    },
+    "&\n7\nF7",
+    {
+      "x": 1,
+      "c": "#bfbad1",
+      "t": "#0d0d0b"
+    },
+    "(\n9\nF9"
+  ],
+  [
+    {
+      "y": -0.875,
+      "x": 5.5,
+      "c": "#7adabd",
+      "t": "#000000"
+    },
+    "%\n5\nF5",
+    {
+      "c": "#f9cd31",
+      "a": 7,
+      "f": 2
+    },
+    "STENO",
+    {
+      "x": 4.5,
+      "f": 6
+    },
+    "<i class='mss mss-Unicode-Option-3'></i>",
+    {
+      "c": "#7adabd",
+      "a": 4,
+      "f": 3,
+      "fa": [
+        0,
+        0,
+        2
+      ]
+    },
+    "^\n6\nF6"
+  ],
+  [
+    {
+      "y": -0.875,
+      "c": "#ffb2d2",
+      "f": 3,
+      "w": 1.5
+    },
+    "\n\n~\n`",
+    {
+      "t": "#0d0d0b"
+    },
+    "!\n1\nF1",
+    {
+      "x": 14.5
+    },
+    ")\n0\nF10",
+    {
+      "a": 7,
+      "w": 1.5
+    },
+    "F11"
+  ],
+  [
+    {
+      "y": -0.375,
+      "x": 3.5,
+      "c": "#a7d0db",
+      "t": "#000000",
+      "a": 6
+    },
+    "L",
+    {
+      "x": 10.5
+    },
+    "C"
+  ],
+  [
+    {
+      "y": -0.875,
+      "x": 2.5,
+      "c": "#bfbad1",
+      "t": "#0d0d0b",
+      "a": 4
+    },
+    ">\n.",
+    {
+      "x": 1,
+      "c": "#7adabd",
+      "t": "#000000",
+      "a": 6
+    },
+    "W",
+    {
+      "x": 8.5
+    },
+    "H",
+    {
+      "x": 1,
+      "c": "#bfbad1",
+      "t": "#0d0d0b"
+    },
+    "P"
+  ],
+  [
+    {
+      "y": -0.875,
+      "x": 5.5,
+      "c": "#7adabd",
+      "t": "#000000"
+    },
+    "M",
+    {
+      "c": "#93c9b7",
+      "a": 4,
+      "h": 1.5
+    },
+    "{\n[",
+    {
+      "x": 4.5,
+      "h": 1.5
+    },
+    "}\n]",
+    {
+      "c": "#7adabd",
+      "a": 6
+    },
+    "F"
+  ],
+  [
+    {
+      "y": -0.875,
+      "c": "#ffb07b",
+      "t": "#0d0d0b",
+      "f": 6,
+      "w": 1.5
+    },
+    "<i class='fa fa-fast-backward'></i>\n\n<i class='fa fa-fast-forward'></i>",
+    {
+      "c": "#ffb2d2",
+      "a": 4,
+      "f": 3
+    },
+    "<\n,",
+    {
+      "x": 14.5,
+      "a": 6
+    },
+    "Y",
+    {
+      "a": 4,
+      "w": 1.5
+    },
+    "|\n\\"
+  ],
+  [
+    {
+      "y": -0.375,
+      "x": 3.5,
+      "c": "#a7d0db",
+      "t": "#000000",
+      "a": 6
+    },
+    "E",
+    {
+      "x": 10.5
+    },
+    "T"
+  ],
+  [
+    {
+      "y": -0.875,
+      "x": 2.5,
+      "c": "#bfbad1",
+      "t": "#0d0d0b"
+    },
+    "O",
+    {
+      "x": 1,
+      "c": "#7adabd",
+      "t": "#000000",
+      "n": true
+    },
+    "I",
+    {
+      "x": 8.5,
+      "n": true
+    },
+    "R",
+    {
+      "x": 1,
+      "c": "#bfbad1",
+      "t": "#0d0d0b"
+    },
+    "N"
+  ],
+  [
+    {
+      "y": -0.875,
+      "x": 5.5,
+      "c": "#7adabd",
+      "t": "#000000"
+    },
+    "U",
+    {
+      "x": 6.5
+    },
+    "D"
+  ],
+  [
+    {
+      "y": -0.875,
+      "c": "#ffb2d2",
+      "t": "#0d0d0b",
+      "fa": [
+        6
+      ],
+      "w": 1.5
+    },
+    "<i class='fa fa-arrows'></i>\n\nTab",
+    {
+      "f": 3
+    },
+    "A",
+    {
+      "x": 14.5,
+      "f": 3
+    },
+    "S",
+    {
+      "a": 4,
+      "fa": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        6
+      ],
+      "w": 1.5
+    },
+    "+\n="
+  ],
+  [
+    {
+      "y": -0.625,
+      "x": 6.5,
+      "c": "#93c9b7",
+      "t": "#000000",
+      "a": 7,
+      "h": 1.5
+    },
+    "(",
+    {
+      "x": 4.5,
+      "h": 1.5
+    },
+    ")"
+  ],
+  [
+    {
+      "y": -0.75,
+      "x": 3.5,
+      "c": "#a7d0db",
+      "a": 4,
+      "f": 3
+    },
+    "\"\n'",
+    {
+      "x": 10.5
+    },
+    "V"
+  ],
+  [
+    {
+      "y": -0.875,
+      "x": 2.5,
+      "c": "#bfbad1",
+      "t": "#0d0d0b"
+    },
+    "Z",
+    {
+      "x": 1,
+      "c": "#7adabd",
+      "t": "#000000"
+    },
+    "K",
+    {
+      "x": 8.5
+    },
+    "G",
+    {
+      "x": 1,
+      "c": "#bfbad1",
+      "t": "#0d0d0b"
+    },
+    "J"
+  ],
+  [
+    {
+      "y": -0.875,
+      "x": 5.5,
+      "c": "#7adabd",
+      "t": "#000000"
+    },
+    "X",
+    {
+      "x": 6.5
+    },
+    "B"
+  ],
+  [
+    {
+      "y": -0.875,
+      "c": "#ffb07b",
+      "f": 9,
+      "w": 1.5
+    },
+    "\n\n<i class='kb kb-Multimedia-Play-Pause'></i>",
+    {
+      "c": "#ffb2d2",
+      "t": "#0d0d0b",
+      "a": 4,
+      "f": 3
+    },
+    "?\n/",
+    {
+      "x": 14.5,
+      "a": 6
+    },
+    "Q",
+    {
+      "c": "#ffb07b",
+      "t": "#000000",
+      "f": 9,
+      "w": 1.5
+    },
+    "<i class='kb kb-Multimedia-Stop'></i>"
+  ],
+  [
+    {
+      "y": -0.375,
+      "x": 3.5,
+      "c": "#d9dae0",
+      "g": true,
+      "a": 7,
+      "f": 3
+    },
+    "",
+    {
+      "x": 10.5
+    },
+    ""
+  ],
+  [
+    {
+      "y": -0.875,
+      "x": 2.5
+    },
+    "",
+    {
+      "x": 1,
+      "c": "#d4872a",
+      "g": false,
+      "a": 5
+    },
+    ";\n:",
+    {
+      "x": 8.5
+    },
+    "_\n-",
+    {
+      "x": 1,
+      "c": "#d9dae0",
+      "g": true,
+      "a": 7
+    },
+    ""
+  ],
+  [
+    {
+      "y": -0.75,
+      "x": 0.5
+    },
+    "",
+    {},
+    "",
+    {
+      "x": 14.5
+    },
+    "",
+    {},
+    ""
+  ],
+  [
+    {
+      "r": 30,
+      "rx": 6.5,
+      "ry": 4.25,
+      "y": -1,
+      "x": 1,
+      "c": "#f9cd31",
+      "g": false
+    },
+    "Alt",
+    {
+      "a": 4,
+      "fa": [
+        0,
+        0,
+        0,
+        9
+      ]
+    },
+    "\n\n\n<i class='kb kb-logo-linux-debian fa-large'></i>"
+  ],
+  [
+    {
+      "c": "#d4872a",
+      "a": 7,
+      "f": 9,
+      "h": 2
+    },
+    "<i class='kb kb-Unicode-BackSpace-DeleteLeft-Big'></i>",
+    {
+      "h": 2
+    },
+    "<i class='fa fa-angle-double-up'></i>",
+    {
+      "c": "#f9cd31",
+      "f": 3
+    },
+    "Ctrl"
+  ],
+  [
+    {
+      "x": 2,
+      "c": "#e26757"
+    },
+    "ESC"
+  ],
+  [
+    {
+      "r": -30,
+      "rx": 13,
+      "y": -1,
+      "x": -3,
+      "c": "#f9cd31",
+      "f": 2
+    },
+    "MEDIA",
+    {},
+    "1HAND"
+  ],
+  [
+    {
+      "x": -3
+    },
+    "LEAD",
+    {
+      "c": "#d4872a",
+      "f": 9,
+      "h": 2
+    },
+    "<i class='kb kb-Return-2'></i>",
+    {
+      "f": 3,
+      "h": 2
+    },
+    "SPC"
+  ],
+  [
+    {
+      "x": -3,
+      "c": "#f9cd31",
+      "f": 2
+    },
+    "HUN"
+  ]
+]

+ 533 - 0
keyboards/ergodox/keymaps/algernon/tools/heatmap-base-layout.json

@@ -0,0 +1,533 @@
+[
+  {
+    "backcolor": "#ffffff",
+    "name": "ErgoDox - algernon's layout: Heatmap",
+    "author": "Gergely Nagy <kbd@gergo.csillger.hu>",
+    "notes": "See [here](https://github.com/algernon/ergodox-layout#readme) for the QMK keymap source.",
+    "switchMount": "cherry",
+    "switchBrand": "gateron",
+    "switchType": "KS-3-Tea",
+    "pcb": true,
+    "css": ".keyborder { -webkit-filter: blur(5px); filter: blur(5px); } .keytop { -webkit-filter: blur(10px); } .keylabels { border: 1px solid black; }"
+  },
+  [
+    {
+      "x": 3.5,
+      "c": "#a7d0db",
+      "fa": [
+        0,
+        0,
+        2
+      ]
+    },
+    "#\n3\nF3",
+    {
+      "x": 10.5,
+      "c": "#a7d0db",
+      "t": "#000000",
+      "a": 4,
+      "fa": [
+        0,
+        0,
+        2
+      ]
+    },
+    "*\n8\nF8"
+  ],
+  [
+    {
+      "y": -0.875,
+      "x": 2.5,
+      "c": "#bfbad1",
+      "t": "#0d0d0b"
+    },
+    "@\n2\nF2",
+    {
+      "x": 1,
+      "c": "#7adabd",
+      "t": "#000000"
+    },
+    "$\n4\nF4",
+    {
+      "x": 8.5
+    },
+    "&\n7\nF7",
+    {
+      "x": 1,
+      "c": "#bfbad1",
+      "t": "#0d0d0b"
+    },
+    "(\n9\nF9"
+  ],
+  [
+    {
+      "y": -0.875,
+      "x": 5.5,
+      "c": "#7adabd",
+      "t": "#000000"
+    },
+    "%\n5\nF5",
+    {
+      "c": "#f9cd31",
+      "a": 7,
+      "f": 2
+    },
+    "STENO",
+    {
+      "x": 4.5,
+      "f": 6
+    },
+    "<i class='mss mss-Unicode-Option-3'></i>",
+    {
+      "c": "#7adabd",
+      "a": 4,
+      "f": 3,
+      "fa": [
+        0,
+        0,
+        2
+      ]
+    },
+    "^\n6\nF6"
+  ],
+  [
+    {
+      "y": -0.875,
+      "c": "#ffb2d2",
+      "f": 3,
+      "w": 1.5
+    },
+    "\n\n~\n`",
+    {
+      "t": "#0d0d0b"
+    },
+    "!\n1\nF1",
+    {
+      "x": 14.5
+    },
+    ")\n0\nF10",
+    {
+      "a": 7,
+      "w": 1.5
+    },
+    "F11"
+  ],
+  [
+    {
+      "y": -0.375,
+      "x": 3.5,
+      "c": "#a7d0db",
+      "t": "#000000",
+      "a": 4
+    },
+    ">\n.",
+    {
+      "x": 10.5,
+      "a": 6
+    },
+    "C"
+  ],
+  [
+    {
+      "y": -0.875,
+      "x": 2.5,
+      "c": "#bfbad1",
+      "t": "#0d0d0b",
+      "a": 4
+    },
+    "<\n,",
+    {
+      "x": 1,
+      "c": "#7adabd",
+      "t": "#000000",
+      "a": 6
+    },
+    "P",
+    {
+      "x": 8.5
+    },
+    "G",
+    {
+      "x": 1,
+      "c": "#bfbad1",
+      "t": "#0d0d0b"
+    },
+    "R"
+  ],
+  [
+    {
+      "y": -0.875,
+      "x": 5.5,
+      "c": "#7adabd",
+      "t": "#000000"
+    },
+    "Y",
+    {
+      "c": "#93c9b7",
+      "a": 4,
+      "h": 1.5
+    },
+    "{\n[",
+    {
+      "x": 4.5,
+      "h": 1.5
+    },
+    "}\n]",
+    {
+      "c": "#7adabd",
+      "a": 6
+    },
+    "F"
+  ],
+  [
+    {
+      "y": -0.875,
+      "c": "#ffb07b",
+      "t": "#0d0d0b",
+      "f": 6,
+      "w": 1.5
+    },
+    "<i class='fa fa-fast-backward'></i>\n\n<i class='fa fa-fast-forward'></i>",
+    {
+      "c": "#ffb2d2",
+      "a": 4,
+      "f": 3
+    },
+    "\"\n'",
+    {
+      "x": 14.5,
+      "a": 6
+    },
+    "L",
+    {
+      "a": 4,
+      "w": 1.5
+    },
+    "|\n\\"
+  ],
+  [
+    {
+      "y": -0.375,
+      "x": 3.5,
+      "c": "#a7d0db",
+      "t": "#000000",
+      "a": 6
+    },
+    "E",
+    {
+      "x": 10.5
+    },
+    "T"
+  ],
+  [
+    {
+      "y": -0.875,
+      "x": 2.5,
+      "c": "#bfbad1",
+      "t": "#0d0d0b"
+    },
+    "O",
+    {
+      "x": 1,
+      "c": "#7adabd",
+      "t": "#000000",
+      "n": true
+    },
+    "U",
+    {
+      "x": 8.5,
+      "n": true
+    },
+    "H",
+    {
+      "x": 1,
+      "c": "#bfbad1",
+      "t": "#0d0d0b"
+    },
+    "N"
+  ],
+  [
+    {
+      "y": -0.875,
+      "x": 5.5,
+      "c": "#7adabd",
+      "t": "#000000"
+    },
+    "I",
+    {
+      "x": 6.5
+    },
+    "D"
+  ],
+  [
+    {
+      "y": -0.875,
+      "c": "#ffb2d2",
+      "t": "#0d0d0b",
+      "fa": [
+        6
+      ],
+      "w": 1.5
+    },
+    "<i class='fa fa-arrows'></i>\n\nTab",
+    {
+      "f": 3
+    },
+    "A",
+    {
+      "x": 14.5,
+      "f": 3
+    },
+    "S",
+    {
+      "a": 4,
+      "fa": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        6
+      ],
+      "w": 1.5
+    },
+    "+\n="
+  ],
+  [
+    {
+      "y": -0.625,
+      "x": 6.5,
+      "c": "#93c9b7",
+      "t": "#000000",
+      "a": 7,
+      "h": 1.5
+    },
+    "(",
+    {
+      "x": 4.5,
+      "h": 1.5
+    },
+    ")"
+  ],
+  [
+    {
+      "y": -0.75,
+      "x": 3.5,
+      "c": "#a7d0db",
+      "a": 6
+    },
+    "J",
+    {
+      "x": 10.5
+    },
+    "W"
+  ],
+  [
+    {
+      "y": -0.875,
+      "x": 2.5,
+      "c": "#bfbad1",
+      "t": "#0d0d0b"
+    },
+    "Q",
+    {
+      "x": 1,
+      "c": "#7adabd",
+      "t": "#000000"
+    },
+    "K",
+    {
+      "x": 8.5
+    },
+    "M",
+    {
+      "x": 1,
+      "c": "#bfbad1",
+      "t": "#0d0d0b"
+    },
+    "V"
+  ],
+  [
+    {
+      "y": -0.875,
+      "x": 5.5,
+      "c": "#7adabd",
+      "t": "#000000"
+    },
+    "X",
+    {
+      "x": 6.5
+    },
+    "B"
+  ],
+  [
+    {
+      "y": -0.875,
+      "c": "#ffb07b",
+      "f": 9,
+      "w": 1.5
+    },
+    "\n\n<i class='kb kb-Multimedia-Play-Pause'></i>",
+    {
+      "c": "#ffb2d2",
+      "t": "#0d0d0b",
+      "a": 4,
+      "f": 3
+    },
+    "?\n/",
+    {
+      "x": 14.5,
+      "a": 6
+    },
+    "Z",
+    {
+      "c": "#ffb07b",
+      "t": "#000000",
+      "f": 9,
+      "w": 1.5
+    },
+    "<i class='kb kb-Multimedia-Stop'></i>"
+  ],
+  [
+    {
+      "y": -0.375,
+      "x": 3.5,
+      "c": "#d9dae0",
+      "g": true,
+      "a": 7,
+      "f": 3
+    },
+    "",
+    {
+      "x": 10.5
+    },
+    ""
+  ],
+  [
+    {
+      "y": -0.875,
+      "x": 2.5
+    },
+    "",
+    {
+      "x": 1,
+      "c": "#d4872a",
+      "g": false,
+      "a": 5
+    },
+    ";\n:",
+    {
+      "x": 8.5
+    },
+    "_\n-",
+    {
+      "x": 1,
+      "c": "#d9dae0",
+      "g": true,
+      "a": 7
+    },
+    ""
+  ],
+  [
+    {
+      "y": -0.75,
+      "x": 0.5
+    },
+    "",
+    {},
+    "",
+    {
+      "x": 14.5
+    },
+    "",
+    {},
+    ""
+  ],
+  [
+    {
+      "r": 30,
+      "rx": 6.5,
+      "ry": 4.25,
+      "y": -1,
+      "x": 1,
+      "c": "#f9cd31",
+      "g": false
+    },
+    "Alt",
+    {
+      "a": 4,
+      "fa": [
+        0,
+        0,
+        0,
+        9
+      ]
+    },
+    "\n\n\n<i class='kb kb-logo-linux-debian fa-large'></i>"
+  ],
+  [
+    {
+      "c": "#d4872a",
+      "a": 7,
+      "f": 9,
+      "h": 2
+    },
+    "<i class='kb kb-Unicode-BackSpace-DeleteLeft-Big'></i>",
+    {
+      "h": 2
+    },
+    "<i class='fa fa-angle-double-up'></i>",
+    {
+      "c": "#f9cd31",
+      "f": 3
+    },
+    "Ctrl"
+  ],
+  [
+    {
+      "x": 2,
+      "c": "#e26757"
+    },
+    "ESC"
+  ],
+  [
+    {
+      "r": -30,
+      "rx": 13,
+      "y": -1,
+      "x": -3,
+      "c": "#f9cd31",
+      "f": 2
+    },
+    "MEDIA",
+    {},
+    "1HAND"
+  ],
+  [
+    {
+      "x": -3
+    },
+    "LEAD",
+    {
+      "c": "#d4872a",
+      "f": 9,
+      "h": 2
+    },
+    "<i class='kb kb-Return-2'></i>",
+    {
+      "f": 3,
+      "h": 2
+    },
+    "SPC"
+  ],
+  [
+    {
+      "x": -3,
+      "c": "#f9cd31",
+      "f": 2
+    },
+    "HUN"
+  ]
+]

+ 145 - 0
keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py

@@ -0,0 +1,145 @@
+#! /usr/bin/env python
+import json
+import os
+import sys
+import re
+
+from math import floor
+
+cr_coord_map = [
+    [
+        # Row 0
+        [ 4,  0], [ 4,  2], [ 2,  0], [ 1,  0], [ 2,  2], [ 3,  0], [ 3,  2],
+        [ 3,  4], [ 3,  6], [ 2,  4], [ 1,  2], [ 2,  6], [ 4,  4], [ 4,  6],
+    ],
+    [
+        # Row 1
+        [ 8,  0], [ 8,  2], [ 6,  0], [ 5,  0], [ 6,  2], [ 7,  0], [ 7,  2],
+        [ 7,  4], [ 7,  6], [ 6,  4], [ 5,  2], [ 6,  6], [ 8,  4], [ 8,  6],
+    ],
+    [
+        # Row 2
+        [12,  0], [12,  2], [10,  0], [ 9,  0], [10,  2], [11, 0], [     ],
+        [      ], [11,  2], [10,  4], [ 9,  2], [10,  6], [12, 4], [12, 6],
+    ],
+    [
+        # Row 3
+        [17,  0], [17,  2], [15,  0], [14,  0], [15,  2], [16,  0], [13,  0],
+        [13,  2], [16,  2], [15,  4], [14,  2], [15,  6], [17,  4], [17,  6],
+    ],
+    [
+        # Row 4
+        [20,  0], [20,  2], [19,  0], [18,  0], [19,  2], [], [], [], [],
+        [19,  4], [18,  2], [19,  6], [20,  4], [20,  6],
+    ],
+    [
+        # Row 5
+        [     ], [23,  0], [22,  2], [22,  0], [22,  4], [21,  0], [21,  2],
+        [24, 0], [24,  2], [25,  0], [25,  4], [25,  2], [26,  0], [      ],
+    ],
+]
+
+def set_attr_at(j, b, n, attr, fn, val):
+    blk = j[b][n]
+    if attr in blk:
+        blk[attr] = fn(blk[attr], val)
+    else:
+        blk[attr] = fn(None, val)
+
+def coord(col, row):
+    return cr_coord_map[row][col]
+
+def set_attr(orig, new):
+    return new
+
+def set_bg(j, (b, n), color):
+    set_attr_at(j, b, n, "c", set_attr, color)
+    #set_attr_at(j, b, n, "g", set_attr, False)
+
+def _set_tap_info(o, count, cap):
+    ns = 4 - o.count ("\n")
+    return o + "\n" * ns + "%.02f%%" % (float(count) / float(cap) * 100)
+
+def set_tap_info(j, (b, n), count, cap):
+    j[b][n + 1] = _set_tap_info (j[b][n + 1], count, cap)
+
+def heatmap_color (v):
+    colors = [ [0.3, 0.3, 1], [0.3, 1, 0.3], [1, 1, 0.3], [1, 0.3, 0.3]]
+    fb = 0
+    if v <= 0:
+        idx1, idx2 = 0, 0
+    elif v >= 1:
+        idx1, idx2 = len(colors) - 1, len(colors) - 1
+    else:
+        val = v * (len(colors) - 1)
+        idx1 = int(floor(val))
+        idx2 = idx1 + 1
+        fb = val - float(idx1)
+
+    r = (colors[idx2][0] - colors[idx1][0]) * fb + colors[idx1][0]
+    g = (colors[idx2][1] - colors[idx1][1]) * fb + colors[idx1][1]
+    b = (colors[idx2][2] - colors[idx1][2]) * fb + colors[idx1][2]
+
+    r, g, b = [x * 255 for x in r, g, b]
+    return "#%02x%02x%02x" % (r, g, b)
+
+# Load the keylog
+def load_keylog(fname, restrict_row):
+    keylog = {}
+    total = 0
+    with open(fname, "r") as f:
+        lines = f.readlines()
+    for line in lines:
+        m = re.search ('KL: col=(\d+), row=(\d+)', line)
+        if not m:
+            continue
+        (c, r) = (int(m.group (2)), int(m.group (1)))
+        if restrict_row != None and r != int(restrict_row):
+            continue
+        if (c, r) in keylog:
+            keylog[(c, r)] = keylog[(c, r)] + 1
+        else:
+            keylog[(c, r)] = 1
+        total = total + 1
+    return total / 2, keylog
+
+def l_flat(s):
+    f = s.split("\n")
+    return ", ".join (f)
+
+def main(base_fn, log_fn, restrict_row = None):
+
+    with open(base_fn, "r") as f:
+        layout = json.load (f)
+
+    ## Reset colors
+    for row in cr_coord_map:
+        for col in row:
+            if col != []:
+                set_bg (layout, col, "#d9dae0")
+                #set_attr_at (layout, col[0], col[1], "g", set_attr, True)
+
+    total, log = load_keylog (log_fn, restrict_row)
+    max_cnt = 0
+    for (c, r) in log:
+        max_cnt = max(max_cnt, log[(c, r)])
+
+    # Create the heatmap
+    for (c, r) in log:
+        coords = coord(c, r)
+        b, n = coords
+        cap = max_cnt
+        v = float(log[(c, r)]) / cap
+        print >> sys.stderr, "%s => %d/%d => %f = %s" % (l_flat(layout[b][n+1]), log[(c,r)], cap, v, heatmap_color(v))
+        set_bg (layout, coord(c, r), heatmap_color (v))
+        set_tap_info (layout, coord (c, r), log[(c, r)], total)
+
+    print json.dumps(layout)
+
+if __name__ == "__main__":
+    if len(sys.argv) < 3:
+        print """Log to Heatmap -- creates a heatmap out of keyboard logs
+
+Usage: log-to-heatmap.py base-layout.json logfile [row] >layout.json"""
+        sys.exit (1)
+    main(*sys.argv[1:])

+ 0 - 0
keyboards/ergodox_ez/keymaps/algernon/tools/max-focused → keyboards/ergodox/keymaps/algernon/tools/max-focused


+ 1 - 1
keyboards/ergodox_ez/keymaps/andrew_osx/keymap.c → keyboards/ergodox/keymaps/andrew_osx/keymap.c

@@ -1,7 +1,7 @@
 // Netable differences vs. the default firmware for the ErgoDox EZ:
 // 1. The Cmd key is now on the right side, making Cmd+Space easier.
 // 2. The media keys work on OSX (But not on Windows).
-#include "ergodox_ez.h"
+#include "ergodox.h"
 #include "debug.h"
 #include "action_layer.h"
 

+ 0 - 0
keyboards/ergodox_ez/keymaps/bepo/bepo.png → keyboards/ergodox/keymaps/bepo/bepo.png


+ 1 - 1
keyboards/ergodox_ez/keymaps/bepo/keymap.c → keyboards/ergodox/keymaps/bepo/keymap.c

@@ -1,4 +1,4 @@
-#include "ergodox_ez.h"
+#include "ergodox.h"
 #include "debug.h"
 #include "action_layer.h"
 #include "keymap_bepo.h"

+ 0 - 0
keyboards/ergodox_ez/keymaps/bepo/readme.md → keyboards/ergodox/keymaps/bepo/readme.md


+ 2 - 0
keyboards/ergodox/keymaps/coderkun_neo2/Makefile

@@ -0,0 +1,2 @@
+SLEEP_LED_ENABLE = no
+UNICODE_ENABLE = yes

+ 14 - 7
keyboards/ergodox_ez/keymaps/coderkun_neo2/keymap.c → keyboards/ergodox/keymaps/coderkun_neo2/keymap.c

@@ -1,7 +1,8 @@
-#include "ergodox_ez.h"
+#include "ergodox.h"
 #include "debug.h"
 #include "action_layer.h"
-#include "keymap_neo2.h"
+#include "led.h"
+#include "keymap_extras/keymap_neo2.h"
 
 // Layer names
 #define BASE 0      // default layer
@@ -33,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  */
 [BASE] = KEYMAP(
         // left hand
-        KC_TAB,     KC_1,   KC_2,   KC_3,   KC_4,   KC_5,   KC_EQL,
+        KC_TAB,     KC_1,   KC_2,   KC_3,   KC_4,   KC_5,   NEO_GRV,
         NEO_Y,      NEO_X,  NEO_V,  NEO_L,  NEO_C,  NEO_W,  KC_HOME,
         NEO_L1_L,   NEO_U,  NEO_I,  NEO_A,  NEO_E,  NEO_O,
         KC_LSFT,    NEO_UE, NEO_OE, NEO_AE, NEO_P,  NEO_Z,  TG(PMQ),
@@ -42,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
                                                                 KC_MINS,
                                             KC_SPC, KC_ENT,    ALL_T(KC_NO),
         // right hand
-        DE_ACUT,    KC_6,   KC_7,   KC_8,   KC_9,   KC_0,   KC_BSPC,
+        NEO_ACUT,   KC_6,   KC_7,   KC_8,   KC_9,   KC_0,   KC_BSPC,
         KC_END,     NEO_K,  NEO_H,  NEO_G,  NEO_F,  NEO_Q,  NEO_SS,
                     NEO_S,  NEO_N,  NEO_R,  NEO_T,  NEO_D,  NEO_L1_R,
         TG(PMN),    NEO_B,  NEO_M,  KC_COMM,KC_DOT, NEO_J,  KC_RSFT,
@@ -140,10 +141,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * │       │     │     │     │  ✕  │     │     │     │     │     │ F9  │ F10 │ F11 │ F12 │       │
  * ├───────┼─────┼─────┼─────╆─────╅─────┤     │     │     ├─────╆─────╅─────┼─────┼─────┼───────┤
  * │       │     │     │     │  ✓  │     ├─────┤     ├─────┤     │ F5  │ F6  │ F7  │ F8  │       │
- * ├───────┼─────┼─────┼─────╄─────╃─────┤     │     │     ├─────╄─────╃─────┼─────┼─────┼───────┤
+ * ├───────┼─────┼─────┼─────╄─────╃─────┤(TL2)│     │(TL3)├─────╄─────╃─────┼─────┼─────┼───────┤
  * │       │     │     │     │     │     │     │     │     │     │ F1  │ F2  │ F3  │ F4  │       │
  * └─┬─────┼─────┼─────┼─────┼─────┼─────┴─────┘     └─────┴─────┼─────┼─────┼─────┼─────┼─────┬─┘
- *   │     │     │(MO1)│     │     │                             │     │     │(MO1)│     │     │
+ *   │     │     │(MO1)│     │(MO4)│                             │(MO4)│     │(MO1)│     │     │
  *   └─────┴─────┴─────┴─────┴─────┘ ┌─────┬─────┐ ┌─────┬─────┐ └─────┴─────┴─────┴─────┴─────┘
  *                                   │ Ms← │ Ms↑ │ │ Ms↓ │ Ms→ │
  *                             ┌─────┼─────┼─────┤ ├─────┼─────┼─────┐
@@ -267,7 +268,13 @@ void matrix_scan_user(void)
             ergodox_right_led_3_on();
         break;
         default:
-            ergodox_board_led_off();
+            if(host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) {
+                ergodox_led_all_set(LED_BRIGHTNESS_HI);
+                ergodox_right_led_1_on();
+            }
+            else {
+                ergodox_board_led_off();
+            }
         break;
     }
 

+ 0 - 0
keyboards/ergodox_ez/keymaps/coderkun_neo2/readme.md → keyboards/ergodox/keymaps/coderkun_neo2/readme.md


+ 1 - 1
keyboards/ergodox_ez/keymaps/colemak/keymap.c → keyboards/ergodox/keymaps/colemak/keymap.c

@@ -1,4 +1,4 @@
-#include "ergodox_ez.h"
+#include "ergodox.h"
 #include "debug.h"
 #include "action_layer.h"
 

+ 0 - 0
keyboards/ergodox_ez/keymaps/colemak/readme.md → keyboards/ergodox/keymaps/colemak/readme.md


+ 0 - 0
keyboards/ergodox_ez/keymaps/colemak_osx_pc_no/keyboard-layout.png → keyboards/ergodox/keymaps/colemak_osx_pc_no/keyboard-layout.png


+ 2 - 2
keyboards/ergodox_ez/keymaps/colemak_osx_pc_no/keymap.c → keyboards/ergodox/keymaps/colemak_osx_pc_no/keymap.c

@@ -1,4 +1,4 @@
-#include "ergodox_ez.h"
+#include "ergodox.h"
 #include "debug.h"
 #include "action_layer.h"
 #include "keymap_norwegian.h"
@@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
         NO_COLN,         KC_A,         KC_R,    KC_S,   KC_T,   KC_D,
         KC_EXLM,        KC_Z,         KC_X,    KC_C,   KC_V,   KC_B,   NO_SCLN,
         MO(4),     KC_BTN1,      KC_BTN2, KC_TAB,GUI_T(KC_COMMA),
-                                                      NO_AMP, NO_PIPE,
+                                                      NO_AMPR, NO_PIPE,
                                                               NO_PLUS,
                                                KC_FN1,CTL_T(KC_DOT),ALT_T(NO_MINS),
         // right hand

+ 0 - 0
keyboards/ergodox_ez/keymaps/colemak_osx_pc_no/readme.md → keyboards/ergodox/keymaps/colemak_osx_pc_no/readme.md


+ 0 - 0
keyboards/ergodox_ez/keymaps/csharp_dev/csharp_dev.png → keyboards/ergodox/keymaps/csharp_dev/csharp_dev.png


+ 0 - 0
keyboards/ergodox_ez/keymaps/csharp_dev/csharp_dev_legend.png → keyboards/ergodox/keymaps/csharp_dev/csharp_dev_legend.png


+ 1 - 1
keyboards/ergodox_ez/keymaps/csharp_dev/keymap.c → keyboards/ergodox/keymaps/csharp_dev/keymap.c

@@ -1,4 +1,4 @@
-#include "ergodox_ez.h"
+#include "ergodox.h"
 #include "debug.h"
 #include "action_layer.h"
 

+ 0 - 0
keyboards/ergodox_ez/keymaps/csharp_dev/readme.md → keyboards/ergodox/keymaps/csharp_dev/readme.md


+ 1 - 1
keyboards/ergodox_ez/keymaps/dave/keymap.c → keyboards/ergodox/keymaps/dave/keymap.c

@@ -1,4 +1,4 @@
-#include "ergodox_ez.h"
+#include "ergodox.h"
 #include "debug.h"
 #include "action_layer.h"
 

+ 0 - 0
keyboards/ergodox_ez/keymaps/dave/readme.md → keyboards/ergodox/keymaps/dave/readme.md


+ 0 - 0
keyboards/ergodox_ez/keymaps/default/default.png → keyboards/ergodox/keymaps/default/default.png


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است