11

Many keyboard layouts in Europe are based on the ISO keyboard layout which looks like this.

enter image description here

In my language the <, > are located on the key next to left shift like this:

Note the less than/greater than key next to left shift!

The problem is that I am using an keyboard with ANSI mechanical layout. The ANSI mechanical layout does not have this key.

Notice the key right of left shift is missing

Notice that key next to left shift previously used for < and > is missing.

Is there any way to enter less than < and greater than > characters on this ANSI keyboard using an French AZERTY layout? Maybe through a AltGr combination?

1
  • 2
    Have you tried using the |\ key on the ANSI keyboard (above Enter)? I ask because the |\ key on the ISO standard keyboard is the key being mapped to <> for your chosen (AZERTY) layout. Dec 31 '15 at 15:49
6

This combination works fine for me on Linux systems:
Alt Gr+Shift+Z to <
Alt Gr+Shift+X to <

Regards

1
5

Is there any way to enter less than < and greater than > characters?

enter image description here

See Instructions for using Windows Alt Codes for help on entering Alt Codes.

Source ALT Codes - Alt Codes for Maths / Mathematics

0
4

Use free AutoHotKey tool and add these two simple macros:

>!u::<  ; Right Alt + u
>!i::>  ; Right Alt + i

This way you mapped your
Alt Gr+U to < and
Alt Gr+I to >.

I chose combinations with Alt Gr (right Alt key) because they are already natural at your national keyboard. But you can use any other mapping you wish.

From higher perspective, this way of keyboard customization can be better than simply finding where the character is located, because this way you can add any other characters you frequently need. For example:

>!f::«  ; Right Alt + f
>!g::»  ; Right Alt + g
>!a::→  ; Right Alt + a
>!b::•  ; Right Alt + b

The same for keyboard layouts with AltGr instead of right Alt key (thanks for reminding about this to loopernow) – and I am personally also using such a setup:

<^>!f::«  ; AltGr + f
<^>!g::»  ; AltGr + g
<^>!a::→  ; AltGr + a
<^>!b::•  ; AltGr + b

Note: make sure your are always running AutoHotKey elevated (i.e. Run as Administrator).

4
  • At least on my physical keyboard and using the Spanish (Mexico) keyboard layout in Windows 10, I had to change a couple things to get this idea to work: a) removed specification of right Alt, because in Spanish layout, right Alt is not right Alt, it is Alt Gr (e.g. left Alt is the key that works); b) used "Send, <" (and "Send, >") on a separate line after the "::", and "return" on the next line after that, instead of the angle bracket character immediately after the "::".
    – loopernow
    Oct 25 '20 at 3:26
  • @loopernow – thank you for the feedback. After some study of Wikipedia article on AltGr and of AHK syntax you would probably soon discover that none of these changes were necessary.
    – miroxlav
    Oct 26 '20 at 15:38
  • For me your script does not work without modification, because when I switch to for example Spanish Latin America keyboard layout, physical right Alt key no longer sends right Alt, instead it send AltGr (which is also apparently Ctrl+Alt). So it looks like "<^>" or "^!" would work instead of ">!" in instances like mine. Probably everything could be on the same line then too, but I'm not at home to test. Is that what you mean? I think what exactly is needed depends on the physical keyboard and the keyboard layout of the user.
    – loopernow
    Oct 27 '20 at 18:11
  • @loopernow – you are right, I did not spot the difference in your first remark, although I am actually also using layout (and shortcuts) with AltGr, not with right Alt. I extended the answer.
    – miroxlav
    Oct 28 '20 at 22:56
0

I like @miroxlav's Autohotkey answer but it doesn't work without modification on my own keyboard. Rather than muddy his answer any further, I want to clarify my own usage case and what my solution is for that usage case.

Like the OP, my keyboard has < and > symbols on the comma and period keys next to the "m" key on the bottom row, near the right Shift. I live in the United States and we do not have keyboards here with an AltGr key. Instead we have two Alt keys; one on each side of the space bar. So my keyboard is like the one the OP is asking about.

I am on Windows 10 and have installed a Spanish keyboard layout as a secondary layout so that I can easily write accent marks and tildes for Spanish writing. The problem is, there are no < or > symbols included in that layout.

What I have found from a little bit of research and experimentation is that this layout replaces what is sent by the physical right Alt key--instead of sending right Alt it sends an "AltGr" keypress. In that way, I can press the physical right Alt key plus the "q" key and get "@" as a result. This is as intended, as there is no other way to get a "@" when using this Spanish layout.

But, there is no way to use the right Alt key to get < or > symbols.

So, here is where an Autohotkey script comes in. However, Autohotkey does not seem to recognize the right Alt key as sending an AltGr keypress, even though Windows 10 does, and the right Alt key no longer sends right Alt keypresses when using this layout either.

So, the problem is: Autohotkey does not recognize the right Alt key as being pressed if we use a script that says the right Alt key is pressed nor when we say AltGr is pressed. Neither of these is recognized:

>! ; right Alt
<!> ; AltGr

What I've discovered is that Ctrl + Alt is another way to send an AltGr keypress. And, Autohotkey recognizes that Ctrl + Alt are pressed when the physical right Alt key is pressed! So, this will be recognized:

^! ; Ctrl + Alt

However, I don't know why, but Autohotkey does not like it when I put the entire shortcut on one line. So here is the script that works on my machine. This script will send < and > symbols when the physical right Alt key and the comma and period keys are pressed, respectively:

^!,::
Send, <  
return
; AltGr + , sends <

^!.::
Send, >
return
; AltGr + . sends >
0

i hit this problem also using the US layout with a keychron K1 (version 4). None of the posted results above did work for me, but here's a solution which worked for me:

RAlt & ,::Send {LAlt down}{Numpad0}{Numpad6}{Numpad0}{LAlt up} ; writes le
RAlt & .::Send {LAlt down}{Numpad0}{Numpad6}{Numpad2}{LAlt up} ; writes gt

this sends using AltGr (right alt) + , a < symbol (because the keys are printed like that) and a > pressing AltGr (right alt) + .

However, you can change those keys as you like. As a side effekt, am using this one (the one posted first)

>!y::<  ; should write less then, but it writes a pipe. it's okay

to write a pipe.

greetings.

1
  • using jetbrain's ide wrote an an error, alternativly: RAlt & ,::Send < RAlt & .::Send >
    – Tony B
    Mar 3 at 8:36
0

OS is Ubuntu 20.04.3 LTS; layout is French.

  • AltGr+Shift+Z = <
  • AltGr+Shift+X= >

You can check the precise button by showing the keyboard layout settings=>Region language=> and one the eyes icon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.