Skip to content

Keymap examples

hasu@tmk edited this page Jun 24, 2018 · 26 revisions

Share your keymap here!

https://github.com/tmk/tmk_keyboard/issues/265


SpaceFN

Refer to this topic on GeekHack for discussion on the layout.

https://geekhack.org/index.php?topic=51069.0

Code

TBD

Keymap Editor

SpaceFN layout: https://goo.gl/aFmnbY

This link itself is for HHKB but you can select your TMK product in 'Base Firmware File' to download proper firmware.

Reverse-shifted for numbers

With pressing Shift and '1' key you get 1 while with just '1' key you get !.

KBT Pure layout

Keymap code on Alps64 https://github.com/thisisshi/tmk_keyboard/blob/15fe63e8d181a8a95988dcc71929f0024df55caa/keyboard/alps64/keymap_pure.c

and guide. https://github.com/thisisshi/tmk_keyboard/blob/77ac0805ade565fb23657e3644c920ada71edccf/keyboard/alps64/Guide.md

Mouse keys with SpaceFn

Keymap editor link: hasu's on Alps64

Programmer's layers on German layout

https://geekhack.org/index.php?topic=41989.msg2218160#msg2218160 http://www.keyboard-layout-editor.com/#/gists/3f4485a4bef29532c9d25c522d221037

Keymap code: https://gist.github.com/tmk/daa925e817cb2a80cd5bc55c4c7c81bd

Colemak

Plain Colemak layout on Keymap Editor

You will be able to use this as starting point. https://goo.gl/t2b5W4

Colemak and extended layout by DreymaR

https://forum.colemak.com/topic/2158-dreymars-big-bag-of-keyboard-tricks-usb2usb-edition/#p18407

QWERTY on AZERTY host

This is intended to use QWERTY layout forcibly somehow on host where AZERTY keyboard is expected. The keymap is tricky due to TMK key action limitation and craziness of AZERTY. This issue may mitigate this in future.

https://geekhack.org/index.php?topic=69169.msg2592504#msg2592504

Keymap Editor link: https://goo.gl/zz2DUx

Vim arrow

I make vim arrow keymap (Control + H, J, K, L to left, down, up, right arrows)

https://github.com/tmk/tmk_keyboard/pull/555

Share you idea here

Space-Fn locking

Would be great to make a space-fn keymap, with locking mecanism. If you need your secondary layer for one key, you "space-key" what you need. But if you need much more (say, you have numpad on the secondary layer) keystrokes, you space-lock it, use whatever strokes you need (make your computation on your virtual numpad), and unlock it when you're done. I think we could do it using:

  • Momentary layer switching on space bar
  • Tap action for actual "space" on primary layer
  • Permanent layer toggle on secondary layer, on the lock key
  • Tap action for "space" on secondary layer to return to primary Is it doable? Is it the right way? Bonus: With two space bars (think Atreus with both thumbs on space), you could implement fn1 on left with locking on right, fn2 on right with locking on left, and unlock on both...

Flash LED on key presses

It turns on Leds for 100ms when any key is pressed, for a fun. You can add this code to your keymap file

diff --git a/keyboard/fc660c/unimap.c b/keyboard/fc660c/unimap.c
index 77c3350..9dbd04c 100644
--- a/keyboard/fc660c/unimap.c
+++ b/keyboard/fc660c/unimap.c
@@ -17,3 +17,21 @@ const action_t actionmaps[][UNIMAP_ROWS][UNIMAP_COLS] PROGMEM = {
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT
     ),
 };
+
+
+#define LED_ON()        PORTB &= ~(1<<5 | 1<<6)
+#define LED_OFF()       PORTB |=  (1<<5 | 1<<6)
+#define LED_DURATION    100
+static uint16_t last_ms = 0;
+void hook_matrix_change(keyevent_t event) {
+    if (event.pressed) {
+        LED_ON();
+        last_ms = timer_read();
+    }
+}
+
+void hook_keyboard_loop(void) {
+    if (TIMER_DIFF_16(last_ms, timer_read()) > LED_DURATION) {
+        LED_OFF();
+    }
+}

https://geekhack.org/index.php?topic=88439.msg2606655#msg2606655

Clone this wiki locally