24

I'm trying to use a UK keymap on a physical US keyboard on my notebook (Asus Zenbook UX31E). My keyboard has vertical bar and backslash (| and \) above the Enter key, but I get hash and tilde instead. On UK keyboards, pipe and backslash seem to be just to the left of the Z key. Unfortunately, I don't have that physical key at all; instead, I just have a fat left Shift key. They needed an extra key to make room for £ and €, so things have moved around a bit, I guess.

I need vertical bar (for pipe) all the time in Linux, and, fortunately, found that with Right Alt+`.

Is there any similar trick for getting a backslash?  Unfortunately, I don't have a numeric keypad, so I couldn't get an escape sequence like Alt+92 working.

By the way, Shift+` gives me the "not" sign, ¬ (which I call "planking L").  I don't think I'll ever need that, so whilst an existing sequence to get a backslash is preferable, a solution that allows me to map backslash onto Shift+` is also acceptable to me.

By the way, I am using Gnome / Ubuntu 13.10.

6
  • 1
    Well, the key to the left of the Z key seems to only be there on UK keyboards. Perhaps you should switch to the "international" keyboard layout that puts the UK pound on RightAlt+Shift 4 and the Euro on RightAlt 5. – Daniel R Hicks Jan 15 '14 at 2:04
  • I used to use a UK keyboard with a Japanese IME input. For some reason, backslash was not mapped and instead ¥ (yen) worked as a perfect replacement in terminal. – Reuben L. Jan 21 '14 at 20:16
  • you could try to make your own keyboard layout with MS KLC (microsoft keyboard layout creator) that might work. – barlop Jan 21 '14 at 20:51
  • please include a screenshot of the keyboard, that may help some people think of things. or others see the problem more clearly. And by the way, why not use a US layout for the US keyboard? – barlop Jan 21 '14 at 20:56
  • also, I found this comment on a forum, it may help. "I had the same problem, and it took me a long time to figure it out. In the top row of keys, right after the F* keys I finally found a small blue picture of a lock. This is the number lock key. Push the FN and the number lock key once to turn on the 10key function in the Qwerty keys and push them both again to turn it off." That said, I see no lock here though I can't zoom in much replacementlaptopkeys.com/images/… – barlop Jan 21 '14 at 20:57

13 Answers 13

22

I have found out that Alt Gr+- gives \.

2
  • 2
    omg if I had know this sooner, it would have saved me a year of switching gb-us all the time... – dorien Jun 22 '15 at 20:31
  • Doesn't work for me for some reason :-( – boardtc Feb 4 at 15:24
19

Press the alt key to the right of the space bar (alt gr), and the key above the enter key (which should typically be hash on a US keyboard set to UK input - but on your laptop it is actually the \ key!). This should provide a backslash!

altGR+#( \ )key

1
  • 1
    This works for me using a physical US (ms surface pro 3) keyboard running in UK mode in windows 8. Also note Windows-SPACE switches between languages in windows, which can be really helpful. – Rory Sep 9 '14 at 13:17
6

If you do not have Alt GR in your keyboard, simply press and hold left ALT then type 92.

1
  • 1
    It worked here! Thank you! – m3dl Dec 29 '20 at 2:42
4

You can find a full list of ALT codes here.

Or try Alt+Shift+:

On the German keyboard backslash is Alt+Shift+7

4
  • Unfortunately, Alt + Shift + : gives me no output. And I can't enter alt codes because I don't have a numeric keypad. – wim Jan 15 '14 at 10:22
  • @wim - I've never seen a keyboard sans keypad that didn't have the numeric keys "shadowed" on the right-hand side of the alpha keyboard. To access it you use "NumLk". – Daniel R Hicks Jan 15 '14 at 12:22
  • 1
    @DanielRHicks I've heard of numeric keypads being accessible with 7,8,9,U,I,O,J,K,L on notepads before, but I've never got it working because I don't seem to have a num lock key! Unless it is some obscure sequence. There isn't anything obviously labelled NumLk on my keyboard. – wim Jan 15 '14 at 12:55
  • On my keyboard (on a Sony Vaio) with identical layout the NumLk key is to the right of F12. But those 4 keys on the right are labeled differently from mine. – Daniel R Hicks Jan 16 '14 at 12:32
2

I have now remapped planking L (¬) to backslash (\) using the following shell script at startup. I am using gnome / Ubuntu 13.10 on an Asus Zenbook.

#!/bin/sh
xmodmap -e "keycode 49 = grave backslash grave notsign bar bar bar bar grave asciitilde"
2

If you are controlling a windows machine remotely that is set to UK then open the "On-screen keyboard" It's in All Programs | Accessories | Ease of Access. You will now see a representation of a keyboard on the screen!

Under the "Keyboard" menu you should have Enhanced Keyboard and 102-keys selected. This gives you the extra UK backslash key.

All the UK servers I control, I now pin the on-screen keyboard to the start menu now so I can get to that key fairly easily. I could set the machines to US keyboards, but my UK based colleagues probably wouldn't thank me for it :)

2

I have the same issue. I bought an Asus ROG gamining laptop off Amazon and no-where did they tell me it was an american keyboard layout. I live in the UK.

what I found is you can still have your Keyboard set to your country but to get the missing key, in my case \ and #, the trick is to hold down alt and type in 92 for \ and hold alt and type 35 for #. (This method requires a numeric keypad)

There is a full list of alt codes here

I have just realised that if you don't have a keypad you can use ctrl alt and \ to get a back slash and Shift ctrl alt and \ to get the pipe |

Hope this helps :)

2

I use a European keyboard and have only a forward-slash /.

Using the alt to the right of the space bar (alt gr) together with the key for / gives |.
Using alt to the right of the space bar (alt gr), plus shift, plus key for / gives backslash \.

1

SHIFT + the key that is at the left of the "1" key, (the key at the top of TAB, or if you prefer at the bottom of ESC)

1
  • I mentioned in the post that this gives me planking L ¬ – wim Jul 27 '14 at 13:51
0

To solve this problem, Simply go to keyboard layout seetings on the control panel and change the keyboard layout to US and save. Proceed as follows; Settings-Control panel-Clock,language,region-Change Input method

0

On windows 8, pressing the back slash key gave me hash, but on pressing the alt gr + back slash key I got the back slash.

1
  • It depend of the Keyboard and Language – yass Apr 8 '17 at 18:36
0

I have just run into this problem on Windows 10. My computer does not have an Alt key to the right of the space bar (Alt Gr) and the Alt + [numbers] doesn't work. I found the solution through trial and error - Ctrl + Shift + \ (key above the Enter key).

-1

Settings > Time and Language > Region and Language > Add a Language > English (US) Honestly the easiest solution, since your keyboard is a US layout.

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