0

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

9
  • What are the exact characters you are trying to type - could you give Unicode codes? (Not the characters you are trying to press, but the final ones.) And are you on Windows?
    – harrymc
    Commented Aug 26, 2019 at 10:34
  • @harrymc In the LaTeX file I'm trying to type a backslash followed by a pipe character, which results in a norm symbol in the PDF file (a double vertical line with unicode 0x2016).
    – Cubi73
    Commented Aug 26, 2019 at 10:38
  • Is this on Windows and is typing unicode 0x2016 directly possible in LaTex?
    – harrymc
    Commented Aug 26, 2019 at 10:41
  • @harrymc Yes, it is on Windows 10 x64.
    – Cubi73
    Commented Aug 26, 2019 at 10:42
  • 1
    This is easy using AutoHotkey, where you can choose hotkeys to generate the difficult characters or even directly the combination \|. Let me know your preferences.
    – harrymc
    Commented Aug 26, 2019 at 10:49

1 Answer 1

1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .