Why does Ctrl+Alt+< not work?

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

Cubi73

Posted 2019-08-26T10:03:06.970

Reputation: 291

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 – 2019-08-26T10:34:46.990

@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 – 2019-08-26T10:38:51.587

Is this on Windows and is typing unicode 0x2016 directly possible in LaTex? – harrymc – 2019-08-26T10:41:32.217

@harrymc Yes, it is on Windows 10 x64. – Cubi73 – 2019-08-26T10:42:08.910

Cross writing. Is typing unicode 0x2016 directly acceptable in LaTex? – harrymc – 2019-08-26T10:42:47.193

@harrymc It is possible in some circumstances. I tred inserting the double vertical line directly via Alt+8214, but this made the LaTeX file not compile anymore. So I guess, in this case I can't rely on directly typing Unicode characters. – Cubi73 – 2019-08-26T10:46:04.063

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 – 2019-08-26T10:49:44.443

@harrymc AutoHotkey works great, thank you very much :) I mapped AltGr+´ to "|" via <^>!VKDD::Send | in the .ahk file, where <^>! stands for AltGr and VKDD is the AHK virtual key code for the accent key. – Cubi73 – 2019-08-26T11:16:51.023

You are too quick. – harrymc – 2019-08-26T11:18:16.987

Answers

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.

Cubi73

Posted 2019-08-26T10:03:06.970

Reputation: 291