Keymap examples - mcaple/tmk_keyboard GitHub Wiki
The Atreus keyboard has 44 keys and a very small and beautiful design. It does require a retrain of memory muscle and because of that investment it feels reasonable that in the event that the keyboard is not available something similar maybe used in its place.
The design relies a lot more on the thumb than a conventional keyboard and has a space key that is dimensionally identical to any other key, one other big advantage of the original Atreus is that the keys are aligned by column as opposed to the more common row alignment. This feature could not be replicated in most standard keyboards.
Due to the requirement for a lower row of 12 keys to allow the thumb to play more of a role the home row along with the others are moved up and to the left corner on a standard keyboard. The home row now becomes the top row. The mapping of this row is:
Row | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
QWERTY (top) | [TAB] | Q | W | E | R | T | Y | U | I | O | P | [ |
Atreus-like (home) | A | S | D | F | G | [No] | [No] | H | J | K | L | : |
Refer to this thread(https://geekhack.org/index.php?topic=69169.msg3086459#msg3086459) on GeekHack for Hasu's very generous explanation.
Keymap editor example: https://bit.ly/3FAD3MP
PROBLEMS:
Toggling back from layer 2 to layer 0 retains the key action value from layer 2 and does not use that of layer 0.
Reproduce:
Click Fun (< on qwerty keyboard) along with Upper (left shift on qwerty keyboard) keys to toggle to layer 2.Verify you are on layer 2 by clicking Home (! on qwerty keyboard) key and you should see your cursor move.Click Upper (left shift on qwerty keyboard) to toggle back to layer 0.Clicking a (Tab on qwerty keyboard) will act as a Delete key from layer 2 and not the a from layer 0.
Fix:
- Hasu explained that you don't toggle on only you toggle on/off and so instead of toggling to layer 0 with T0 we needed to toggle layer 2 off with T2. Brilliant!!
When LALT
is pressed, keys ijkl
become arrow keys(up
, left
, down
, right
) and uohn
becomes nagvigation keys (home
, end
, pageup
, pagedown
). But if you press alt
with other key, it acts as it should be (that means you can still use alt+tab
to switch window and alt+f
to open a menu).
The code please refer https://github.com/chenzhihuai1990/tmk_keyboard/blob/master/keyboard/hhkb/keymap_smartalt.c
CONS: You can use combination such as alt+h
to open help.
PROS: You have any thing like SpaceFN while need not to tolerate with space delay.
Essence of the idea is changing keymap layer by thumb using feature called Dual role key. Key layout may vary for preference.
Dual role key is called Tap key in TMK. You can use ACTION_LAYER_TAP_KEY for this like below:
ACTION_LAYER_TAP_KEY(1, Space)
Refer to this thread(https://geekhack.org/index.php?topic=51069.0) on GeekHack for SpaceFN.
Keymap Editor example: https://bit.ly/3licBwS
TBD
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.
With pressing Shift and '1' key you get 1 while with just '1' key you get !.
Keymap code on Alps64 https://github.com/thisisshi/tmk_keyboard/blob/15fe63e8d181a8a95988dcc71929f0024df55caa/keyboard/alps64/keymap_pure.c
Keymap editor link: hasu's on Alps64
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
You will be able to use this as starting point. https://goo.gl/t2b5W4
https://forum.colemak.com/topic/2158-dreymars-big-bag-of-keyboard-tricks-usb2usb-edition/#p18407
https://github.com/tmk/tmk_keyboard/pull/577 https://github.com/tmk/tmk_keyboard/blob/924ae8be4f668e99c95c585fbf3025013d2fee9d/keyboard/hhkb/keymap_jp_colemak.c
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
I make vim arrow keymap (Control + H, J, K, L to left, down, up, right arrows)
https://github.com/tmk/tmk_keyboard/pull/555
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...
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