[atreus] Re: Fwd: Re: Umlauts and Layers - atreus - FreeLists
- From: Phil Hagelberg <phil@xxxxxxxxxx>
- To: atreus@xxxxxxxxxxxxx
- Date: Mon, 15 Feb 2016 08:11:40 +0700
Holger Wenzel <drholgerwenzel@xxxxxxxxx> writes:
I didn't find a way to do this with the default driver and switched to
the TMK driver. There is a guy called frobniac who has made a german
layout for the Ergodox keyboard.
Hi, yeah this is one of the reasons I am planning on changing it so that
TMK is the recommended firmware.
For me to get going I copied the definition of the RMOD_KEY action
#define MODS4(mods) (((mods)>>4 | (mods)) & 0x0F)
#define ACTION_RMOD_KEY(mod, key) ACTION(ACT_RMODS, MODS4(MOD_BIT
(mod))<<8 | (key))
and defined function keys
I couldn't stop thinking:"There must be an easier way to achieve
this", but I didn't find any.
Yes, there is definitely an easier way to do this if I am reading what
you did correctly. If all you're doing is sending a right-alt+keycode at
the same time you don't need to add an entry in fn_actions for every
single modified key.
Unfortunately there is no existing macro for right alt, just left alt,
so I will add this. It looks like this, in keymap_common.h
#define RALT(key) ACTION(ACT_MODS, (MOD_RALT << 8) | (key))
And you use it in the keymap just like you would any other modifier, so
instead of SHIFT(KC_1) you could do RALT(KC_Q) or whatever, depending on
what your OS is expecting. I believe some OSes require a whole sequence
of keycodes for umlauts, but if all you need is a modifier then this
should do the trick.
Hope that helps!
Description: PGP signature
Other related posts: