How to get the @ key to work on a laptop keyboard?
-
- Posts: 24
- Joined: Tue 02 Jun 2009, 12:56
- Location: Scottish Borders
How to get the @ key to work on a laptop keyboard?
Having installed puppy on an old laptop, no matter what keyboard i select in the setup menu, i cant get one of the keys to work (the @ key, as in an email address.) Can I access it via a character set elsewhere, or interrogate the keyboard in any way? I really don'I' think its the hardware, im sure the key worked when I had XP installed.
-
- Posts: 1198
- Joined: Tue 05 Aug 2008, 18:12
- Location: UK
irishrm wrote
However I don't think he was interested in where it was physically but rather that it didn't work and he wanted an alternative way to enter the symbol.
Like in Windows it's alt+64 (using the numbers keypad to type 64).
Good question. Does anyone else know if it can be done in Linux. Ascii is ascii after all and not OS dependent.
Thanks
Dave
Yes if you have a US keyboard layout but not for all layouts. eg in the UK-GB keyboard pressing shift+2 gives the " symbol.The @ key can be found by pressing shift+2 Irishrm
However I don't think he was interested in where it was physically but rather that it didn't work and he wanted an alternative way to enter the symbol.
Like in Windows it's alt+64 (using the numbers keypad to type 64).
Good question. Does anyone else know if it can be done in Linux. Ascii is ascii after all and not OS dependent.
Thanks
Dave
- Sit Heel Speak
- Posts: 2595
- Joined: Fri 31 Mar 2006, 03:22
- Location: downwind
If changeing the keyboard country code in /etc/keymap to the correct one for this laptop does not fix it, then either the key has died or else the keyboard must be sending a very unusual code.
Good reference:
http://cweiske.de/howto/xmodmap/allinone.html
Open an rxvt window and issueThen try the @. It should output, to the console, two KeyPress events (one for the Shift key and the second for the @ key proper) and two KeyRelease events. On my us keyboard the output looks like this:Ctrl-C to get out of xev. Decimal 11 is the ascii keycode for @. You can see a complete list of the ascii keycodes understood by your keyboard driver within this X session, by issuing
The ascii keycodes can be remapped by creating a file ~/.Xmodmap (~ = /root in all Puppies except multiuser ones) and populating it as shown in the page linked above and briefly described below.
Some keys do not generate an ascii keycode, such as "wireless on/off" and "battery display on/off" special keys on laptops. For these, you must hit the key and then issueand thereby see what four-byte hexadecimal bios keycode was issued (well, at least, you can on mine, I have kernel loglevel set to 3--don't know if you can see it on Barry's kernels, which have kernel loglevel set to 7, or not). Then add, at the bottom of the user-specific init startup file /etc/rc.d/rc.local, a line such as where e007 is the hexadecimal code shown by dmesg | tail and 93 is an unassigned ascii keycode as shown by xmodmap -pke. Then edit your ~/.Xmodmap to assign 93 to an unused keycode, the easy choice being an F-key higher than 12, say F13 (~./Xmodmap will contain the line:) . Finally, in the keybindings file of your window manager, associate F13 with the @ symbol. Identity and syntax of the keybindings file varies with the particular window manager, google and a little study are your friends here. Reboot, and all should be good.
HTH, SHS
Good reference:
http://cweiske.de/howto/xmodmap/allinone.html
Open an rxvt window and issue
Code: Select all
xev
Code: Select all
KeyPress event, serial 30, synthetic NO, window 0x1a00001,
root 0x63, subw 0x0, time 4257407994, (451,402), root:(583,560),
state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 30, synthetic NO, window 0x1a00001,
root 0x63, subw 0x0, time 4257409884, (451,402), root:(583,560),
state 0x1, keycode 11 (keysym 0x40, at), same_screen YES,
XLookupString gives 1 bytes: (40) "@"
XmbLookupString gives 1 bytes: (40) "@"
XFilterEvent returns: False
KeyRelease event, serial 30, synthetic NO, window 0x1a00001,
root 0x63, subw 0x0, time 4257410007, (451,402), root:(583,560),
state 0x1, keycode 11 (keysym 0x40, at), same_screen YES,
XLookupString gives 1 bytes: (40) "@"
XFilterEvent returns: False
KeyRelease event, serial 30, synthetic NO, window 0x1a00001,
root 0x63, subw 0x0, time 4257410134, (451,402), root:(583,560),
state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Code: Select all
xmodmap -pke
Some keys do not generate an ascii keycode, such as "wireless on/off" and "battery display on/off" special keys on laptops. For these, you must hit the key and then issue
Code: Select all
dmesg | tail
Code: Select all
setkeycodes e007 93
Code: Select all
keycode 93 = F13
HTH, SHS
Re: How to get the @ key to work on a laptop keyboard?
First question: does every other punctuation symbol show up fortrampintransit2 wrote:Having installed puppy on an old laptop, no matter what keyboard i select in the setup menu, i cant get one of the keys to work (the @ key, as in an email address.) Can I access it via a character set elsewhere, or interrogate the keyboard in any way? I really don'I' think its the hardware, im sure the key worked when I had XP installed.
the expected keypress combo?
-
- Posts: 1198
- Joined: Tue 05 Aug 2008, 18:12
- Location: UK
SHS
Thank you for your very helpful and comprehensive reply.
I tried in Puppy 214X and 431 and in both cases it reported keycode 48 for the @ symbol. Not 11 as in your case. I am using a UK (GB) keyboard so I hit the keys where @ is located on a US keyboard and it reported keycode 11. So keycodes seem to relate to where the keys are physically.
So when you say
I looked at xmodmap -pke but as the list is long I had to do
which gave me "at" at keycode 48. So far so good.
As all my keys are working just fine (it's trampintransit2 who has the problem) I didn't go any further as, although you have given an excellent description of what to do, it looked a bit of work.
I just was hoping there might be a simple app that would do this and allow, say, typing into it as 64 is the decimal number for the @ character in the ascii character page, in a similar way, dare I say it, that Windows allows.
If you or anyone else knows of such an app I'd appreciate it.
Again thanks for this educational reply.
Appreciated
Dave
Thank you for your very helpful and comprehensive reply.
I tried
Code: Select all
xev
So when you say
I guess you really meanDecimal 11 is the ascii keycode for @.
Also Ctlr+c didn't get me out of xev. I wonder what version of Puppy you are using?...for a US keyboard.
I looked at xmodmap -pke but as the list is long I had to do
Code: Select all
xmodmap -pke | less
As all my keys are working just fine (it's trampintransit2 who has the problem) I didn't go any further as, although you have given an excellent description of what to do, it looked a bit of work.
I just was hoping there might be a simple app that would do this and allow, say, typing into it
Code: Select all
ctlr+64
If you or anyone else knows of such an app I'd appreciate it.
Again thanks for this educational reply.
Appreciated
Dave
You can use the unicode for the @ sign, it is 0040, to enter it hold Ctrl+Shift and press u when you have a chance to write, you should then see an underlined u and it will allow to you type 0040, hit space and you're done. This is not an ideal solution, but it should work, and then you can always copy/paste it in the future.
Edit: If you are copying and pasting over more than one program, using a clipboard will make that really easy. I am not sure if all Puppy's have one? If not it shouldn't be hard to find a .pet in here somewhere.
Edit: If you are copying and pasting over more than one program, using a clipboard will make that really easy. I am not sure if all Puppy's have one? If not it shouldn't be hard to find a .pet in here somewhere.
- Sit Heel Speak
- Posts: 2595
- Joined: Fri 31 Mar 2006, 03:22
- Location: downwind
Not a standard one. It's a woof-based upup with full Gnome plus much more, the "rxvt" window is actually xterm. bash, readline, and so forth are all somewhat newer than "stock" Puppy's.davesurrey wrote:Ctrl+c didn't get me out of xev. I wonder what version of Puppy you are using?
Glipper is one clipboard available for Puppy.
-
- Posts: 1198
- Joined: Tue 05 Aug 2008, 18:12
- Location: UK
-
- Posts: 24
- Joined: Tue 02 Jun 2009, 12:56
- Location: Scottish Borders
Correct.davesurrey wrote:[
I triedin Puppy 214X and 431 and in both cases it reported keycode 48 for the @ symbol. Not 11 as in your case. I am using a UK (GB) keyboard so I hit the keys where @ is located on a US keyboard and it reported keycode 11. So keycodes seem to relate to where the keys are physically.Code: Select all
xev
When you press a key, they keyboard sends a scan code that equates to the position of the key on the keyboard. The OS maps that key position to whatever character is assigned to that key by the language and keyboard layout you use.
______
Dennis
Hi
You can find it in various threads throughout the forum,
here is just two of them:
Bruce B Posted: Wed Oct 29, 2008 xev.zip
Pizzasgood Posted: Mon Jul 20, 2009 xev_standalone.pet
CatDude
.
I seem to recall reading that xev was taken out of Puppy (i don't know when exactly), and i can't see it in a default 4.31DMcCunney wrote:It's /usr/X11R7/bin/xev in Puppy 4.31 here.trampintransit2 wrote:im using 4.3.1, if i open a console and enter xev i get -
command not found
Check to see that /usr/X11R7/bin is in your $PATH.
You can find it in various threads throughout the forum,
here is just two of them:
Bruce B Posted: Wed Oct 29, 2008 xev.zip
Pizzasgood Posted: Mon Jul 20, 2009 xev_standalone.pet
CatDude
.
