| Unix Content | Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| Hello all, The characters that should be available under third level shift (mapped to "Alt Gr" on my keyboard) cannot be typed when running X. In a ttyv they work just fine. I read through the keyboard and kbdcontrol man pages a bit and came up with the following setup: In /etc/rc.conf I have included the line keymap="be.iso.acc" in order to load the be.iso.acc keymap on boot. The line that defines e.g. the key with &, 1 and | has the following entry in the be.iso.acc.kbd file: # scan cntrl alt alt cntrl lock # code base shift cntrl shift alt shift cntrl shift state # ------------------------------------------------------------------ 002 '&' '1' nop nop '|' '|' nop nop O Looks correct to me. When I check the key events with xev everything looks fine too; the "Alt Gr" key is read as ISO 3rd-level shift, and pressing e.g. "Alt Gr" and the "&" key is read out as the "|" character. I've also added the following in my .login_conf file me:\ :charset=iso-8859-1:\ :lang=en_US.ISO8859-1: to make sure I'm using the iso-8859-1 charset. Without this I cannot type characters such as é and ç without using the compose key. That's all I can come up with for now. I googled my *ss off, but to no further avail. Is there anything else I'm missing? Thanks. -- Mijnen deem, mijnen deem Stoeng heelmaal vol exeem ~ Katastroof |
|
#2
|
| In our last episode, the lovely and talented TomB broadcast on comp.unix.bsd.freebsd.misc: > Hello all, > The characters that should be available under third level shift > (mapped to "Alt Gr" on my keyboard) cannot be typed when running X. > In a ttyv they work just fine. > I read through the keyboard and kbdcontrol man pages a bit and came up > with the following setup: > In /etc/rc.conf I have included the line > keymap="be.iso.acc" > in order to load the be.iso.acc keymap on boot. > The line that defines e.g. the key with &, 1 and | has the following > entry in the be.iso.acc.kbd file: > # scan cntrl alt alt cntrl lock > # code base shift cntrl shift alt shift cntrl shift state > # ------------------------------------------------------------------ > 002 '&' '1' nop nop '|' '|' nop nop O > Looks correct to me. Yes. But these keymaps are in /usr/share/syscons, right? Well, that syscons is short for system console. Nothing you do here will affect the keyboard in X - not even login terminals which may seem in many respects like a tty, but are not. > When I check the key events with xev everything looks fine too; the > "Alt Gr" key is read as ISO 3rd-level shift, and pressing e.g. "Alt Gr" > and the "&" key is read out as the "|" character. > I've also added the following in my .login_conf file > me:\ > :charset=iso-8859-1:\ > :lang=en_US.ISO8859-1: > to make sure I'm using the iso-8859-1 charset. Without this I cannot > type characters such as é and ç without using the compose key. > That's all I can come up with for now. I googled my *ss off, but to no > further avail. > Is there anything else I'm missing? Yes. None of the above has anything to do with X. X is not really a part of the BSD system. X is completely different in order that it be more-or-less the same whether it runs on one of the BSD flavors, Linux, or another sort-of-unix-like system. You need to be looking at xmodmap. -- Lars Eighner SAVE BEASTIE! "What do you do when you're debranded?" usenet@larseighner.com http://larseighner.com/ Scott Adams is an optimist. |
|
#3
|
| On Wed, 20 Aug 2008 02:30:12 +0000, Lars Eighner wrote: > In our last episode, > > the lovely and talented TomB > broadcast on comp.unix.bsd.freebsd.misc: > >> Hello all, > >> The characters that should be available under third level shift >> (mapped to "Alt Gr" on my keyboard) cannot be typed when running X. >> In a ttyv they work just fine. > >> I read through the keyboard and kbdcontrol man pages a bit and came up >> with the following setup: > >> In /etc/rc.conf I have included the line > >> keymap="be.iso.acc" > >> in order to load the be.iso.acc keymap on boot. > >> The line that defines e.g. the key with &, 1 and | has the following >> entry in the be.iso.acc.kbd file: > >> # scan cntrl alt alt cntrl lock >> # code base shift cntrl shift alt shift cntrl shift state >> # ------------------------------------------------------------------ > >> 002 '&' '1' nop nop '|' '|' nop nop O > >> Looks correct to me. > > Yes. But these keymaps are in /usr/share/syscons, right? Well, > that syscons is short for system console. Nothing you do here will > affect the keyboard in X - not even login terminals which may > seem in many respects like a tty, but are not. > >> When I check the key events with xev everything looks fine too; the >> "Alt Gr" key is read as ISO 3rd-level shift, and pressing e.g. "Alt Gr" >> and the "&" key is read out as the "|" character. > >> I've also added the following in my .login_conf file > >> me:\ >> :charset=iso-8859-1:\ >> :lang=en_US.ISO8859-1: > >> to make sure I'm using the iso-8859-1 charset. Without this I cannot >> type characters such as é and ç without using the compose key. > >> That's all I can come up with for now. I googled my *ss off, but to no >> further avail. > >> Is there anything else I'm missing? > > Yes. None of the above has anything to do with X. > > X is not really a part of the BSD system. X is completely different > in order that it be more-or-less the same whether it runs on one > of the BSD flavors, Linux, or another sort-of-unix-like system. Well, I normally use Debian, in which I define the keyboard layout for X in the keyboard section of xorg.conf, such as Section "InputDevice" Identifier "Keyboard" Driver "kbd" Option "XkbModel" "pc105" Option "XkbRules" "xorg" Option "XkbLayout" "be" EndSection I did the same for FreeBSD, and it does set the Belgian layout, but without the accented characters such as é and à, and the 3rd level shift characters such as | and #. The accented chars issue was fixed by adding the lines I described earlier to .login_conf (so it *does* affect X in a way), but I still can't get the 3rd level shift ones in X. > You need to be looking at xmodmap I do use xmodmap to remap some keys, but according to xev (which checks for X events) the correct characters *are* generated, so there's no need to remap them. Basically xev is the only program that gets e.g. an "@" when "Alt Gr" "é" is pressed. Anything else I can look at? |
|
#4
|
| In our last episode, and talented TomB broadcast on comp.unix.bsd.freebsd.misc: > I do use xmodmap to remap some keys, but according to xev (which checks > for X events) the correct characters *are* generated, so there's no need > to remap them. Basically xev is the only program that gets e.g. an "@" > when "Alt Gr" "é" is pressed. > Anything else I can look at? Look at the application. Some seem to access the keyboard at a lower level. Also, this seems a little obvious: prepare a few lines in the application, save it, and open it in a binary editor or a text editor that will tell you the character codes. The application may actually be getting the correct characters in the document, but you do not see them correctly because the application is using a wrong font. -- Lars Eighner SAVE BEASTIE! "What do you do when you're debranded?" usenet@larseighner.com http://larseighner.com/ TIP: To tweak a port or read the distribution information before you make, use #make extract to unpack the distribution file. |
|
#5
|
| On 2008-08-20, TomB wrote: > On Wed, 20 Aug 2008 02:30:12 +0000, Lars Eighner wrote: >> You need to be looking at xmodmap > > I do use xmodmap to remap some keys, but according to xev (which checks > for X events) the correct characters *are* generated, so there's no need > to remap them. Basically xev is the only program that gets e.g. an "@" > when "Alt Gr" "é" is pressed. Using xmodmap was where it went wrong. I call it from my .xinitrc, and when I comment it out and log in to X again, the 3rd level shift chars work fine. Calling xmodmap manually from a terminal at that point sets my desired keyswapping, *without* breaking the 3rd level shift chars. Can anyone shed a light on this one? -- Attempted murder, now honestly, what is that? Do they give a Nobel Prize for attempted chemistry? ~ Sideshow Bob |
|
#6
|
| In our last episode, <4E_qk.155857$bi3.33565@newsfe11.ams2>, the lovely and talented TomB broadcast on comp.unix.bsd.freebsd.misc: > On 2008-08-20, TomB wrote: >> On Wed, 20 Aug 2008 02:30:12 +0000, Lars Eighner wrote: >>> You need to be looking at xmodmap >> >> I do use xmodmap to remap some keys, but according to xev (which checks >> for X events) the correct characters *are* generated, so there's no need >> to remap them. Basically xev is the only program that gets e.g. an "@" >> when "Alt Gr" "é" is pressed. > Using xmodmap was where it went wrong. I call it from my .xinitrc, and > when I comment it out and log in to X again, the 3rd level shift chars > work fine. Calling xmodmap manually from a terminal at that point sets > my desired keyswapping, *without* breaking the 3rd level shift chars. > Can anyone shed a light on this one? Hmm, I never did it from .xinit. I load xmodmap from the window manager. Perhaps the window manager is stomping on xmodmap. Configuration for the window managers varies greatly, but there is usually a hook for stuff to do on startup. In fvwm2 it looks like this: DestroyFunc InitFunction AddToFunc InitFunction + I Module FvwmBanner + I exec xphoon + I exec xmodmap .xmodmap-debranded.6dollardialup.com + I exec xmodmap -e "keysym Num_Lock = Num_Lock Pointer_EnableKeys" + I exec xclipboard -- Lars Eighner SAVE BEASTIE! "What do you do when you're debranded?" usenet@larseighner.com http://larseighner.com/ chown -R us:us yourbase/* |
|
#7
|
| TomB > The characters that should be available under third level shift (mapped to > "Alt Gr" on my keyboard) cannot be typed when running X. In a ttyv they > work just fine. Note that your keyboard is broken. Get a real one. > I read through the keyboard and kbdcontrol man pages a bit and came up with > the following setup: kdbcontrol changes syscons, not X11. You need to look at setxkbmap. > In /etc/rc.conf I have included the line > keymap="be.iso.acc" > in order to load the be.iso.acc keymap on boot. This will work only for syscons. > Is there anything else I'm missing? Other than a normal keyboard, you probably need to configure the "correct" keymap in xorg.conf. Probably with a XkbRules entry. See the "be" rules file in /usr/local/share/X11/Xkb/rules/be, for instance. Alternatively, you may need to find out what keycode this mysterious "Alt Gr" key sends and use xmodmap to make it a 'third level shift'. - Philip -- Philip Paeps Please don't email any replies philip@paeps.cx I follow the newsgroup. your name brings up a geocities site as the first result http://www.google.com/search?hl=en&q=jason+donovan |
|
#8
|
| On Sun, 24 Aug 2008 10:16:55 UTC, Philip Paeps wrote: > Alternatively, you may need to find out what keycode this mysterious "Alt Gr" > key sends and use xmodmap to make it a 'third level shift'. I don't quite understand why it's 'mysterious' to you, although if you've led a sheltered US-centric life you may not have seen one...it's the right hand Alt key. The scan code is the two byte sequence E0 38 (with E0 B8 when released). Hope this helps the OP. -- Bob Eager UNIX since v6.. http://tinyurl.com/2xqr6h |
|
#9
|
| Bob Eager > On Sun, 24 Aug 2008 10:16:55 UTC, Philip Paeps > > Alternatively, you may need to find out what keycode this mysterious "Alt > > Gr" key sends and use xmodmap to make it a 'third level shift'. > > I don't quite understand why it's 'mysterious' to you, although if you've > led a sheltered US-centric life you may not have seen one...it's the right > hand Alt key. It may surprise you that I am in fact Belgian. > The scan code is the two byte sequence E0 38 (with E0 B8 when released). > Hope this helps the OP. There we go. The OP just needs to map that to 'third level shift' and stuff should work. - Philip -- Philip Paeps Please don't email any replies philip@paeps.cx I follow the newsgroup. [in #compsoc] done in one day |
|
#10
|
| On Sun, 24 Aug 2008 13:45:46 UTC, Philip Paeps wrote: > Bob Eager > > On Sun, 24 Aug 2008 10:16:55 UTC, Philip Paeps > > > Alternatively, you may need to find out what keycode this mysterious "Alt > > > Gr" key sends and use xmodmap to make it a 'third level shift'. > > > > I don't quite understand why it's 'mysterious' to you, although if you've > > led a sheltered US-centric life you may not have seen one...it's the right > > hand Alt key. > > It may surprise you that I am in fact Belgian. The Belgian PC keyboard has an AltGr key, so it's rather mysterious that you call it mysterious! -- Bob Eager UNIX since v6.. http://tinyurl.com/2xqr6h |
|
#11
|
| On 2008-08-24, Philip Paeps wrote: > TomB >> The characters that should be available under third level shift (mapped to >> "Alt Gr" on my keyboard) cannot be typed when running X. In a ttyv they >> work just fine. > > Note that your keyboard is broken. Get a real one. Hèhè, always on the mission. It's still on the todo list. Unfortunately the nice people at The Linux Emporium fail to reply to my mails. Makes one wonder why they bother putting an email address on their site. When was that trip to Japan of yours? :-) >> I read through the keyboard and kbdcontrol man pages a bit and came up with >> the following setup: > > kdbcontrol changes syscons, not X11. You need to look at setxkbmap. > >> In /etc/rc.conf I have included the line >> keymap="be.iso.acc" >> in order to load the be.iso.acc keymap on boot. > > This will work only for syscons. Yes. Still glad I've ventured there though. I now finally know how to configure the keyboard outside of X. >> Is there anything else I'm missing? > > Other than a normal keyboard, you probably need to configure the "correct" > keymap in xorg.conf. Probably with a XkbRules entry. See the "be" rules file > in /usr/local/share/X11/Xkb/rules/be, for instance. Yes, this was the first thing I did. See my other posts in this thread. > Alternatively, you may need to find out what keycode this mysterious "Alt Gr" > key sends and use xmodmap to make it a 'third level shift'. This was all correct, as indicated by xev. See my other posts in this thread. As I've already said: the misbehaviour of my - already broken ;-) - keyboard was caused by the fact that xmodmap was ran from .xinitrc. I still don't understand why. > - Philip > -- tommy@mordor:~$ telnet mordor telnet: could not resolve mordor/telnet: One does not simply telnet into mordor! |
|
#12
|
| Bob Eager > On Sun, 24 Aug 2008 13:45:46 UTC, Philip Paeps > > Bob Eager > > > On Sun, 24 Aug 2008 10:16:55 UTC, Philip Paeps > > > > Alternatively, you may need to find out what keycode this mysterious > > > > "Alt Gr" key sends and use xmodmap to make it a 'third level shift'. > > > > > > I don't quite understand why it's 'mysterious' to you, although if > > > you've led a sheltered US-centric life you may not have seen one...it's > > > the right hand Alt key. > > > > It may surprise you that I am in fact Belgian. > > The Belgian PC keyboard has an AltGr key, so it's rather mysterious that you > call it mysterious! I've always resisted Belgian keyboards as cruel and unusual. :-) I use a happy hacking keyboard with a Unix-qwerty layout. - Philip -- Philip Paeps Please don't email any replies philip@paeps.cx I follow the newsgroup. BOFH Excuse #324: Your packets were eaten by the terminator |
|
#13
|
| On Sun, 24 Aug 2008 14:40:36 UTC, TomB wrote: > On 2008-08-24, Philip Paeps wrote: > > TomB > >> The characters that should be available under third level shift (mapped to > >> "Alt Gr" on my keyboard) cannot be typed when running X. In a ttyv they > >> work just fine. > > > > Note that your keyboard is broken. Get a real one. > > Hèhè, always on the mission. What's he trying to say, Tom? That a 'real' keyboard won't have AltGr because it won't be a Windows keyboard? Is he another Linux zealot? -- Bob Eager UNIX since v6.. http://tinyurl.com/2xqr6h |
|
#14
|
| On Sun, 24 Aug 2008 19:18:24 UTC, Philip Paeps wrote: > Bob Eager > > On Sun, 24 Aug 2008 13:45:46 UTC, Philip Paeps > > > Bob Eager > > > > On Sun, 24 Aug 2008 10:16:55 UTC, Philip Paeps > > > > > Alternatively, you may need to find out what keycode this mysterious > > > > > "Alt Gr" key sends and use xmodmap to make it a 'third level shift'. > > > > > > > > I don't quite understand why it's 'mysterious' to you, although if > > > > you've led a sheltered US-centric life you may not have seen one...it's > > > > the right hand Alt key. > > > > > > It may surprise you that I am in fact Belgian. > > > > The Belgian PC keyboard has an AltGr key, so it's rather mysterious that you > > call it mysterious! > > I've always resisted Belgian keyboards as cruel and unusual. :-) > I use a happy hacking keyboard with a Unix-qwerty layout. How do you define a UNIX [1] keyboard? One from a Sun workstation? If it's a QWERTY one, on a PC, then either it's a US one or I would expect it to have AltGr. [1] Not 'Unix' -- Bob Eager UNIX since v6.. http://tinyurl.com/2xqr6h |
|
#15
|
| Bob Eager > On Sun, 24 Aug 2008 19:18:24 UTC, Philip Paeps > wrote: > >> Bob Eager >> > On Sun, 24 Aug 2008 13:45:46 UTC, Philip Paeps >> > > Bob Eager >> > > > On Sun, 24 Aug 2008 10:16:55 UTC, Philip Paeps >> > > > > Alternatively, you may need to find out what keycode this mysterious >> > > > > "Alt Gr" key sends and use xmodmap to make it a 'third level shift'. >> > > > >> > > > I don't quite understand why it's 'mysterious' to you, although if >> > > > you've led a sheltered US-centric life you may not have seen one...it's >> > > > the right hand Alt key. >> > > >> > > It may surprise you that I am in fact Belgian. >> > >> > The Belgian PC keyboard has an AltGr key, so it's rather mysterious that you >> > call it mysterious! >> >> I've always resisted Belgian keyboards as cruel and unusual. :-) >> I use a happy hacking keyboard with a Unix-qwerty layout. > > How do you define a UNIX [1] keyboard? One from a Sun workstation? If > it's a QWERTY one, on a PC, then either it's a US one or I would expect > it to have AltGr. > > [1] Not 'Unix' Something with the "control" key where it belongs - next to the "a". The Sun Type 5 remains my canonical reference for a "good" keyboard. I'm aware it's got an "alt gr" key. I file that key under "mysterious" together with all the other keys on the type5 that have no clear use - like most of the left side of the keyboard. Though, "stop" of course has it's uses on Sun machines. I like happy hacking keyboards because they've got the 'important bits' of the type5 and places them where they belong. I do map the right "alt", which is where the "compose" key would go on a type5 to "compose" though. Pretty much the only real problem with type5 keyboards is that they don't make desks large enough for them. The happy hacking keyboard solves that problem. - Philip -- Philip Paeps Please don't email any replies philip@paeps.cx I follow the newsgroup. ![]() ![]() |
|
#16
|
| Bob Eager > On Sun, 24 Aug 2008 14:40:36 UTC, TomB > wrote: > >> On 2008-08-24, Philip Paeps wrote: >> > TomB >> >> The characters that should be available under third level shift (mapped to >> >> "Alt Gr" on my keyboard) cannot be typed when running X. In a ttyv they >> >> work just fine. >> > >> > Note that your keyboard is broken. Get a real one. >> >> Hèhè, always on the mission. > > What's he trying to say, Tom? That a 'real' keyboard won't have AltGr > because it won't be a Windows keyboard? Is he another Linux zealot? My criticism of the Belgian keyboard layout is world-famous on the Belgian parts of Usenet. :-) And I wouldn't consider myself a Linux zealot. Sadly, Linux-work accounts for a significant portion of my income together with real-time systems, but FreeBSD is my kernel of choice. It's also the one I hack on in my so-called spare time. - Philip -- Philip Paeps Please don't email any replies philip@paeps.cx I follow the newsgroup. "I cut myself on a spoon." "How?" "It was a very sharp spoon." -- TRiPpy |
|
#17
|
| Begin On 24 Aug 2008 20:31:47 GMT, Philip Paeps > > My criticism of the Belgian keyboard layout is world-famous on the > Belgian parts of Usenet. :-) Ah, perhaps you could try a Dutch layout sometime. *runs away very quickly* -- j p d (at) d s b (dot) t u d e l f t (dot) n l . This message was originally posted on Usenet in plain text. Any other representation, additions, or changes do not have my consent and may be a violation of international copyright law. |
|
#18
|
| On Sun, 24 Aug 2008 20:31:47 UTC, Philip Paeps wrote: > And I wouldn't consider myself a Linux zealot. Sadly, Linux-work accounts for > a significant portion of my income together with real-time systems, but > FreeBSD is my kernel of choice. It's also the one I hack on in my so-called > spare time. That's good to hear. Been using BSD for 31 years here! -- Bob Eager UNIX since v6.. http://tinyurl.com/2xqr6h |
|
#19
|
| On Sun, 24 Aug 2008 20:28:03 UTC, Philip Paeps wrote: > > How do you define a UNIX [1] keyboard? One from a Sun workstation? If > > it's a QWERTY one, on a PC, then either it's a US one or I would expect > > it to have AltGr. > > > > [1] Not 'Unix' > > Something with the "control" key where it belongs - next to the "a". The Sun > Type 5 remains my canonical reference for a "good" keyboard. I'm aware it's > got an "alt gr" key. I file that key under "mysterious" together with all the > other keys on the type5 that have no clear use AltGr on an IBM keyboard selects additional characters - not many on my UK variant, mind. This is a real 102-key IBM keyboard which I've been using for 16 years daily (the same physical keyboard). The control key is not where you say, though. It too is a fairly large keyboard, particularly in depth...but somewhere to keep pens. It also provides a ledge wide enough for my cat to cross in front of the screen! -- Bob Eager UNIX since v6.. http://tinyurl.com/2xqr6h |
|
#20
|
| On Sun, 24 Aug 2008 20:42:47 UTC, jpd > Begin > On 24 Aug 2008 20:31:47 GMT, Philip Paeps > > > > My criticism of the Belgian keyboard layout is world-famous on the > > Belgian parts of Usenet. :-) > > Ah, perhaps you could try a Dutch layout sometime. *runs away very quickly* LOL! -- Bob Eager UNIX since v6.. http://tinyurl.com/2xqr6h |