LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to type back slash? Altgr+ vertical line does not work. (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-type-back-slash-altgr-vertical-line-does-not-work-4175568222/)

sangijosh 01-28-2016 11:30 PM

how to type back slash? Altgr+ vertical line does not work.
 
how to type backslash? Alt gr+ vertical line does not work.

pan64 01-29-2016 01:02 AM

that depends on your keyboard layout, so hard to say anything from here. Usually it is not far from |, actually on the "default" English layout it is the same key (with and without shift).

jdkaye 01-29-2016 03:26 AM

On my layout (English-UK) you use Shift-|, not Alt-gr. The key is located in the lower left-hand corner of my keyboard (Logitech K120).
jdk

273 01-29-2016 03:44 AM

Quote:

Originally Posted by jdkaye (Post 5489151)
On my layout (English-UK) you use Shift-|, not Alt-gr. The key is located in the lower left-hand corner of my keyboard (Logitech K120).
jdk

I'm confused now - on my GB keyboards the backslash doesn't need shift it's the pipe symbol which does.

BW-userx 01-29-2016 07:42 AM

black slash
Code:

/
forward slash
Code:

\
problem is most people get these backwards...

BW-userx 01-29-2016 07:44 AM

Quote:

Originally Posted by 273 (Post 5489159)
I'm confused now - on my GB keyboards the backslash doesn't need shift it's the pipe symbol which does.

quick solution, don't use your shift key when you need to get a blackslash...

mine is US and I have that same problem btw.... if one can call it a problem...

it's located right side just under the BackSpace key..

I just push it with my index finger, works every time :D

DavidMcCann 01-29-2016 12:27 PM

What sort of keyboard do you use? The backslash is in QWERTY, QWERTZ, and AZERTY.

ondoho 01-29-2016 02:54 PM

imho(*) backslash is this: \
and on my keyboard (scandinavian) it's reached with AltGr and the plus sign in the top row (i know, it sucks).
i usually use my thumb for AltGr :cool::jawa:

(*) also wikipedia's

suicidaleggroll 01-29-2016 02:57 PM

Quote:

Originally Posted by BW-userx (Post 5489300)
black slash
Code:

/
forward slash
Code:

\
problem is most people get these backwards...

No, you have it backwards.

https://en.wikipedia.org/wiki/Slash_(punctuation)
https://www.cs.ucsb.edu/~pconrad/top...sForwardSlash/
http://www.howtogeek.com/181774/why-...rward-slashes/
http://pc.net/helpcenter/answers/bac..._forward_slash

BW-userx 01-29-2016 03:39 PM

Point proven :D

the way I was taught in college was it is back slash because it ends on the back stroke, /

the foreward slash ends on the forward stroke /

so blame that college teacher dude ---

jdkaye 01-30-2016 01:56 AM

Quote:

Originally Posted by 273 (Post 5489159)
I'm confused now - on my GB keyboards the backslash doesn't need shift it's the pipe symbol which does.

No, you're not. My mistake. No shift required for \. I'm the one who was confused, not you. :redface:
jdk

BW-userx 01-30-2016 07:01 AM

Quote:

Originally Posted by jdkaye (Post 5490220)
No, you're not. My mistake. No shift required for \. I'm the one who was confused, not you. :redface:
jdk

you're the exact reason they invented voice recognition software :D

Just funnin ya ;)

273 01-30-2016 07:03 AM

Quote:

Originally Posted by jdkaye (Post 5490220)
No, you're not. My mistake. No shift required for \. I'm the one who was confused, not you. :redface:
jdk

Ah, thanks, I'm often confused so thought it was me.

DavidMcCann 01-30-2016 10:47 AM

Out of curiosity, I've been looking at where the "" goes in those keyboards that don't have it printed, but require AltGr. I never realised there were so many possibilities!
_ # < / + Q Ö ' ß

Of course, there's always
Compose / /

jdkaye 01-30-2016 01:17 PM

Quote:

Originally Posted by BW-userx (Post 5490282)
you're the exact reason they invented voice recognition software :D

Just funnin ya ;)

I should know. ;) That's one of the things I worked on before I retired.
jdk

Sheik Yabooty 02-27-2017 07:32 PM

UK keyboard
 
I have the same issue with backslash and pipe key being void using Ubuntu 16.04 (works fine on an identical machine running Ubuntu Studio 16.10) Sorry if this is old news - it is still pertinant to me, so I guess others?

I have managed to work out that the backslash key can be accessed by using the Alt Gr + the key to the right of zero, and the pipe key can be accessed by using the Alt Gr + the key to the left of one. Additional keys can also be found using using Alt+shift+key (result!)

I do not know why the standard backslash/pipe key does not function at all in Ubuntu, but works fine in Ubuntu Studio?
The sudo nano /etc/default/keyboard file has "pc105" for XKBMODEL and "gb" for XKBLAYOUT on both machines, both are the same Dell 105 key UK keyboards. Hope this is of some help to someone.

notKlaatu 02-27-2017 07:45 PM

That's a good tip.

Another way round your problem is to map the backslash and pipe to the key you want, manually, with Xmodmap. I had to do this on my laptop because I bought it secondhand, and it came with a non-US keyboard. Since I use Dvorak layout anyway, most of the keys not being "right" didn't bother me, but some keys needed extra assistance to get where they were supposed to be.

In a file called ~/.xmodmap:

Code:

keycode 51 = backslash bar backslash bar
The key code may NOT be 51 in your case, but that seems to be pretty common.

To find out for sure, launch `xev` from a terminal. Then press the key that should produce the backslash. In the terminal output, look for `keycode` and then [some number]. That's the keycode you want to use.

To test, use the xmodmap command:

Code:

$ xmodmap ~/.xmodmap
Now your backslash and pipe should work as expected.

If so, add that xmodmap command to your ~/.bash_profile or ~/.bashrc file.

DavidMcCann 02-28-2017 11:19 AM

If you can't find backslash and bar (\|), here's what to do.

1. Open a terminal and enter the command "setxkbmap -print". The output will include a line starting like
xkb_symbols {include "pc+gb"
That shows that I have a driver that includes the basic keys (pc, for things like SPACE) and the British layout (gb).

2. Now you know your layout name, look at its file in the folder /usr/share/x11/xkb/symbols/
Search that file for "backslash" and for "bar" to find where they are. The file may start with an "include" statement, so if it says "include latin(type 4)" you may have to search the "latin" file as well.

The alphanumberic keys are labeled by A plus a letter for the line (from A for the space bar to E for the top line) plus the number in the line. Thus AC02 is the second key in the home row: S. Three keys have special designations. TLDE is at the top left. LSGT is to the left of Z. BKSP is at the right end of the home row on international keyboards but at the right end above ENTER on US keyboards.

Each entry will have 2 or 4 symbols listed: basic, Shift + basic, AltGr + basic, AltBr + Shift + basic. So if your keyboard was Spanish (es), you'd get
key <AE11> {[ apostrophe, question, backslash, questiondown ]};
key <AE01> {[ 1, exclam, bar, exclamdown ]};
That shows you that both backslash is on "'", bar is on "1", and both need the AltGr key.


All times are GMT -5. The time now is 03:27 AM.