Entering a backslash when using UK keyboard layout on US keyboard

This is more for my own reference than anything else but today I was needing to enter a backslash key while using a US keyboard but with UK keyboard settings.

After trying pretty much every key on the keyboard in all combinations, I realised there was no key combination that would do this directly. Curiously it's a common problem and I found untold blog and forum entries that were not helpful. They basically said to change your input to US when using a US keyboard.

I figured there is always a way of entering a character by its code and of course this works. If you have a keypad, you can enter <Alt>92 and you'll get a backslash. That's all I needed in this case.

130 thoughts on “Entering a backslash when using UK keyboard layout on US keyboard”

        1. doesn't work for me but I've just found that => '\' and that => '|'.
          The symbols actually marked on the key are \ and | but when pressing it without alt I usually get # and ~.

        2. 1st reply lost the useful bits …2nd go.
          alt 92 doesn't work for me but I've just found that Ctrl+alt+# gives \ and that Ctrl+alt+~ gives |.
          The key is labelled \ and | but when I press it I normally get # and |.

          1. Well done mate i found that you have to Press CTRL +ALT + #~ button gives you \ (backslash)

        3. oops slight typo…I meant that th Key normally gives # and ~. The Tilde is reached using the shift key so ctrl+alt+shirt+key to get |.

      1. Thank you! My friend bought me a US layout keyboard but I touch type so I'm used to a UK layout but I could get \| working which is very much needed for coding!

  1. The funny is thing is that I recently bought a laptop from eBay and it has a us keyboard so this is really I useful!
    I've just been using the us layout but prefer uk!

  2. Or you could use 'Alt Gr + The normal US button for backslash'.
    Alt Gr is the one to the right hand side of the space bar and the normal US button for the backslash is next to the enter button and shift key (may slightly differ on different keyboards). This is much easier then using the Alt code.

    1. Thank you! Had my UK laptop stolen temporarily and using a US one with UK keyboard "installed" – could not find the \ anywhere 🙂

    2. That's the one that worked for me! Thanks Zacy5000 🙂
      Love my US laptop, and can do most things except that darned backslash – have been copying and pasting it from other docs LOL…. and now just two keys and it is done. Perfect xx

  3. Try Ctrl + alt + (# or whatever the backslash button on your keyboard is). This works on my asus laptop when I change it to UK layout.

  4. That's the point though. On the keyboard I was using, no key did this, with or without other key combinations.

  5. I found this post because I have the same problem on my HP Chromebook 11. (It's not Windows, but rather Google Chrome OS, but still the same problem.) That is, I have a UK keyboard layout set but I have a physical US keyboard.
    I'm not sure how much, if at all, this applies to Windows, Mac, or Non-ChromeOS linux, but one thing that works for me is to do AltGr+Hyphen for the back-slash. And, although one can make the (previously) allographic equivalent of a vertical line, it's only a broken bar ( ¦ ).
    Hope this helps for any Chromebook users out there! ^-^

  6. Works fine, hold the alt button down and then nine and two on the key pad 9 and 2.
    For those of you who said it didn't work, not the 92 above the keyboard.

  7. As above:
    Hold the Alt button down (NOT the AltGr button) and then key nine (9) and two (2) on the NUMERIC key pad…
    Note:  the \ symbol only appears when you release the Alt key.  
    – These notes have saved me hours!
    – Just to show off, I did these \ backslashes following the instructions!
    Thanks a lot to All  
    |
    \|/
    V
    Heh heh

  8. Thanks for this.
    My problem came at trying to change domains.  I had changed the Keyboard layout to US on the user which fixed the problem, but when I tried to change users, I needed to type he domain name, and it kept reverting to the UK layout, but on a US Laptop keyboard.
    As this keyboard does not have a numeric pad, I used the ALT + FN + 92 (9K) and it worked

  9. I have a laptop that I bought in Singapore but has UK keyboard mapped. To get the backslash (took me a long time to work this out!) you have to press the <ALT> button to the RIGHT of the space bar + backslash button. As neither of the <ALT> buttons on my keyboard are actually labelled <ALT GR> I was of the assumption that they were both the same and of course the one on the left is, for me, the natural one to use so I hadn't been trying it. Hope this helps somebody else.

  10. Help please.  I am using US keyboard and cannot type forward slash. I have tried all advice without joy.  can anyone help please.

  11. Thanks Darren – that's working perfectly, even when mapping a network drive via File Explorer (where Alt+92 wouldn't work).

        1. I'd actually forgotten again and came back here to read your reply again! It makes perfect sense as I don't have a keypad and the fn keys do numbers!

  12. I have a Lenovo X201 laptop with no backslash key or numeric keypad.
    Fn + Numlock (turns on the numeric keypad) then Alt + 92 worked.

  13. Thanks for the thread everyone. This has been frustrating me for weeks.  On HP US keyboard set to UK, Zacy500)'s 'ALT GR' + '\' works great for me.

  14. Hi
    On windows 8.1 upwards the ALT combinations don't work. Therefor the US/UK keyboard doesn't work and the backslash doesn't work. I had to use the onboard keyboard.

  15. None of the above worked on my Vortex laptop configured for the UK. Bright idea from or IT guy – use the on screen keyboard.

  16. I have a US keyboard that I like to have set to UK layout settings and came across this problem. Since this method didn't work for me, the easiest thing I found to do on my laptop was to add the US keyboard layout as another keyboard in the languages settings on windows. Now I use the shortcut Win + space to quickly switch keyboard layout, press the normal key on the US keyboard for backslash and then use the same shortcut to switch back to the UK layout settings.

    1. Thank you, thank you , thank you. I had tried everything!!! Nothing worked until this. Thanks again.

  17. For anyone that don't know you may face this problem for usb mode because when I boot it up and got me to repair mode my backlash for command prompt didn't work for me I noticed I switched it to the wrong country that's why I recommend using uS keyboard because for UK I faced the problem few nights ago.

  18. On VMWARE console, \ is not visible… solution below–>
    Simultaneously press right hand ALT key and -hyphen(‐) key… you will get \

  19. UK keyboard driver on a US physical keyboard (where the backslash key produces #): Right Alt+\
    It doesn't work using the left Alt key (at least not on my Dell).
    For a vertical bar/pipe symbol (|) use Ctrl+Alt+Shift+\
    Here it doesn't matter which side (left or right) you use for Ctrl, Alt & Shift.

  20. Thanks so much! This has saved me a lot of pain!
    "Zacy5000 said:
    Or you could use 'Alt Gr + The normal US button for backslash'.
    Alt Gr is the one to the right hand side of the space bar and the normal US button for the backslash is next to the enter button and shift key (may slightly differ on different keyboards). This is much easier then using the Alt code."
    Made my day! And helped save a lot of hassle.

  21. ALT (hold down) + 9 + 2 (then release)
    only works for me when you use the numeric keypad. not the numbers along the top of the key board.
    but thanks, took me a few goes to figure it out.

  22. cheers for the alt + # method. This worked on Windows 10, but note that it only works with the alt on the right side of keyboard, not with the left hand alt key). and it's alt + shift + # to get the pipe (|)  

  23. If you are using a Mac Keyboard use the alt/option key to the right of the space bar and tap the forward slash buttone located above the enter/return button. This will give you the '\' too 🙂

  24. "After trying pretty much every key on the keyboard in all combinations, I realised there was no key combination that would do this directly." – what OS are you using? Mac? Because if you're using Windows (and probably Linux), "pretty much every key on the keyboard in all combinations" obviously ain't "every key on the keyboard in all combination" because like Zacy5000 pointed out AltGr+# works perfectly (likewise AltGr+Shift+# produces | on British keyboards). Quite easier than typing Alt+Num9+Num2 especially since depending on size, laptops can have quite a screwed up numpad that takes way letters and numbers when turned on (mine does). I don't want to criticize, but AltGr is a common modifier on nonUS keyboards and is the first thing that comes to mind. Backslash being on the same place on British keyboard like on American keyboard while holding AltGr is the most logical place for it to be. Even if left Alt isn't labelled properly, it's still going to function like AltGr if you set your layout to any layout that has the key. Even if it doesn't, pressing Ctrl+Alt+# (AltGr is actually a Ctrl+Alt shortcut) will do 🙂
    In case all that fails (chances of that happening are 0.0000000000000000000000000001%) – like you said – you can use Alt+Num9+Num2 or you can just switch to the American layout which would definitely be easier if you have to type several backslashes and if you have a small keyboard 🙂

    1. Yes, can be a challenge on some systems. I always choose laptops with decent keyboards, including number pads.

  25. thank you – saved me a bunch of time searching for it on a US Layout – Spanish physical keyboard 🙂

  26. Didn't work for me, but I was using one of those mini keyboards linked to my TV by a wifi dongle.
    After much trial and error, the # key actually turned out to be the backslash.

  27. at last found the \ . I've had to use windows powershell
    for an online course, accessed from my oldish macbook pro, which normally has the \ easily accessible on the marked key. But in powershell had to find it with:
    ctrl + alt + '
    No idea how to get | though

  28. on my Chromebook alt gr – alt to right of space – and minus key does the job

    alt – = \

    ps ctrl + alt and – does nothing.

Leave a Reply

Your email address will not be published. Required fields are marked *