18

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
  • 3
    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, 2015 at 15:49

7 Answers 7

11

This combination works fine for me on Linux systems:

  • Alt Gr+Shift+Z to <

  • Alt Gr+Shift+X to <

1
  • You wouldn't happen to also know where '=' is would you? I cannot for the life of me figure out how to type that. Mar 13 at 13:05
6

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 the 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 a 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, 2020 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, 2020 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, 2020 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, 2020 at 22:56
2

You can use Alt keys

Using the numeric keypad for the numbers (make sure Num Lock is on), you can use this combination:

<: Hold Alt while these in sequence: 6, 0. Then release Alt.

>: Hold Alt while these in sequence: 6, 2. Then release Alt.

Reference

2
  • Actually, on my Windows 10 machine is does not make any difference if NumLock is on or off. Otherwise, this answer made my day, thank you.
    – kriegaex
    Jan 5 at 0:34
  • Correction: I just noticed that in some programs, it does make a difference, such as IntelliJ IDEA. There, obviously without NumLock the keyboard interactions yield some kind of navigation commands.
    – kriegaex
    Jan 5 at 0: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 aren't any < or > symbols included in that layout.

I have found from a little bit of research and experimentation that this layout replaces what is sent by the physical right Alt key--instead of sending right Alt it sends an "AltGr" key press. 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 key press, even though Windows 10 does, and the right Alt key no longer sends right Alt key presses 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 key press. 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 previous answer worked 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 effect, I 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.

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

I'm using Logitech's G915 TKL, and I just noticed the combination does these characters:

  • AltGr + (the key left of the 1) = <
  • AltGr + 1 = >
3
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Jun 10, 2022 at 9:42
  • That probably depends on the keyboard layout in the operating system. What keyboard layout? Mar 19 at 22:59
  • cont' - For instance, it is the case for the BÉPO layout. Mar 19 at 23:04

You must log in to answer this question.

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