Make Key Bindings Send Keyboard Events in Awesome Window Manager

awesomekeyboardUbuntu

I don't think that title probably helps very much, but here's my issue:

I'm using the awesome window manager and am trying to make my key bindings to be similar in flavor to OSX for special keys. I'm learning German, so I somewhat regularly need to type vowels with umlauts (double dots) above them. In OSX, to do this, you type Alt+U, then the vowel you want.

Obviously, that won't be feasible in awesome, but what I do want is modkey+ to send a keyboard event that gives it the impression I had hit an umlaut-ed key.

Would I have to change the keyboard layout first? Such that the code changes the layout, sends the corresponding event, then changes it back? Or can I send the event without changing the layout?

And how do I send the event in the first place, if that's possible?

Best Answer

You would do this via Xmodmap and not via your window manager. This is directly related to your keyboard layout/keymap and not your window manager.

To change your xmodmap create a file named ~/.Xmodmap and add the following content. This should allow you to to type üäöß directly with altgr+u

keysym a = a A adiaeresis Adiaeresis
keysym o = o O odiaeresis Odiaeresis
keysym u = u U udiaeresis Udiaeresis
keysym s = s S ssharp section

Afterwards you have to apply the content from this file with xmodmap ~/.Xmodmap

Another way to input umlauts is to use the us international layout. This allows you to enter umlauts with " + char. To enter ä you would need to enter "a. The international layout is also available in Windows and as far as i know in OSX.

setxkbmap -layout us -variant intl
Related Question