How can I type a backslash with no backslash key?
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.
613 Answers
I have found out that Alt Gr+- gives \.
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
1If you do not have Alt GR in your keyboard, simply press and hold left ALT then type 92.
1You can find a full list of ALT codes here.
Or try Alt+Shift+:
On the German keyboard backslash is Alt+Shift+7
4I 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" 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 :)
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 :)
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 \.
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)
1To 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
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.
1I 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).
Settings > Time and Language > Region and Language > Add a Language > English (US) Honestly the easiest solution, since your keyboard is a US layout.