-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I find keycodes for special German / Danish / Nordic keys to use in defsrc? #360
Comments
The It is also rather restricted in terms of what it accepts, hence symbols that wouldn't phase the parser in a |
@slotThe is spot on. The ink on your keys doesn't match the events that get sent to the kernel. The easiest solution would be to run |
Thank you! Defining a US layout was straightforward, and I have now verified its correctness with Mapping the US layout back to Danish, I run into some unforeseen and undesirable behavior. Following the "Special characters" section in this suggested wiki-etry, I've added the following to else empty
and use the following
That works, partially, but with a lot of issues. The keys work, but in different ways, each key acts unexpected in combination with ´Shift´ and ´AltGr´. Am I missing some step? |
No, that is how special characters work in Linux, we use compose sequences to emit rapid macros that tell the OS what to encode. I.e. we emit something like The other option that might work better if you have to use special characters a lot is to simply emit the raw keycodes that your keyboard would have (i.e. if you test Do you understand what I'm describing? |
I believe I do, and thank you for it! As option 1 doesn't seem to work ideally for me (e.g., I do need my Shift + ø to be Ø, not Œ ), I tried option 2. Option 2 works under X, but not under Wayland, when I boot with no remappings active and my input source set to Danish, run kmonad with a config file where |
Good to hear it works well under X. In regards to Wayland, I haven't had a chance at all to test things on Wayland (I'm a sucker for XMonad, so I'm going to ride this sinking ship for as long as I can). I should probably install it and run a standard WM, at least for testing purposes. I'll have a go at that when I've finished wrapping up the current refactoring I'm working on. I'm guessing that if an actual, physical keyboard can be made to work well with Wayland using Danish input mappings, then KMonad must be doable too, since we don't rely at all on X. What I would investigate first, if I were you, is if Wayland will map *all * keyboards to Danish-mode. I.e. when you start KMonad we essentially 'create' a simulated keyboard using the |
The KMonad name did seem to hint to somebody's preferences :) I'm sorry if I'm being slow here, but what you are suggesting is that I as a first step get my hands on an external, non-Danish keyboard and check whether that acts as desired with my input source set to Danish, under Wayland? And if not, then troubleshoot that, learn a lesson, and apply the same to KMonad? |
Oops: didn't explain my suggestion correctly. What I was suggesting was treating your KMonad remapping entirely as US-english, but keeping in the back of your head that your OS is going to be remapping some US keys to Danish keys. So don't try to get KMonad to emit special characters, like |
Oh: and as an addendum, how you could do that under X: After KMonad is launched, call an |
This seems fixed so I'm closing for now |
Sorry for commenting on an old, closed issue, but I wondered how exactly I could achieve the behavior described in:
Because this is exactly what I'm looking for. Basically, I want to be able to insert foreign symbols (German umlauts in my case) while a modifier key is pressed. I want to be able to get upper- and lowercase characters, which doesn't seem to work if I use the symbols directly in my kmonad mappings. |
I'm trying to set up using a laptop with a Danish keyboard. It's a ThinkPad, and I have been using the X220 DE template by @slotThe to get started defining my
defsrc
block.The template quickly doesn't match, as my keyboard has
½
left of1
, so I replace that just with^
as in the X220 template, to get started. Alas:Figuring that maybe I can't just paste, I try replacing
^
with+
:OK. So I look up the keycodes in Keycode.hs and see that maybe I should use
kp+
instead of just+
. Succés! Now that doesn't error.Alas, my first Danish character does:
OK. I cant find anything relevant in Keycodes.hs, so to move on, I replace it with what is in the X220 template, namely ß -- eszett, the german double s. Alas, to no avail:
Now I'm confused. I can't seem to find anything in Keycodes.hs. Others have seemingly had it working earlier. I'm at a loss.
How do I figure out what keycodes I should use to define my
defsrc
block?I apologize if I have missed something obvious. I'm on the Ubuntu-related Pop!_OS 21.04 running Wayland.
The text was updated successfully, but these errors were encountered: