Monday, May 22, 2017

keyboard - Why does Ctrl+Alt+< not work?



My new laptop has a bit of an unusual German keyboard layout where the < key is located to the right of AltGr (see image below). This makes typing \| (AltGr+ß followed by AltGr+<) really really hard (and when typing math-stuff in LaTeX, this happens really really often). Then, I found out that all the AltGr-combinations can be replaced by Ctrl+Alt-combinations. On my machine this works for all AltGr-combinations EXCEPT AltGr+<.




So my first question is: Why? Why would Ctrl+Alt+* work for all keys except <? And my second question is whether it is possible (preferably but not necessarily without external software) to map AltGr+´ to AltGr+< to make typing \| easier?



enter image description here


Answer



Thanks to @harrymc for hinting at AutoHotkey.



I use the following AutoHotkey-script to map AltGr+´ on my keyboard to the pipe symbol |.



#NoTrayIcon

IconVisible := 0

; Map AltGr+´ to send a pipe character "|".
; ^! means Ctrl+Alt and
; VKDD is the AHK virtual key code for my ´-key.
^!VKDD::Send |

; Toggeling the AHK tray icon
; ^!+ means Ctrl+Alt+Shift and VKDD again is the ´-key
^!+VKDD::

if (IconVisible == 1) {
Menu, Tray, NoIcon
IconVisible = 0
} else {
Menu, Tray, Icon
IconVisible = 1
}


I found the AHK virtual key code by running some dummy AHK-script, double-clicking the tray icon and then opening View->Key history.



No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...