Re: My Alt keys don't work!

2009-09-25 Thread chombee
I guess there's no software way around my problem (my built-in keyboard 
has a stuck Alt key so I had to disable it with Xmodmap, but that also 
disabled the Alt key on the external keyboard because it has the same 
key code). I tried remapping various keys on the external keyboard to 
Alt: Caps Lock, Alt Gr, Left Control, but none of them quite worked. The 
old-school keyboard doesn't have a handy key for this situaion, like Fn 
or Win key or the built-in keyboard's 'grab' keys. I think its due to 
the old IBM keyboard hardware, but it seems that certain keys such as 
Caps Lock cannot be held down and used as a modifier in quite the way 
that Alt is used, and certain keys cannot be pressed at the same time as 
others. In short, it looks like the only way you'll be able to do things 
like Alt+Tab,Tab,Tab (pressing tab multiple times without releasing alt) 
or Ctrl+Alt+Tab is by using the actual Alt key.

So I fixed it by disassembling the OLPC XO-1 laptop and fixing the stuck 
Alt key with a bit of electrical tape, following the instructions on the 
OLPC wiki, so that I no longer need to disable Alt in Xmodmap. It worked 
almost perfectly, could do with a slightly thicker piece of tape I 
think.

So now I can use my external keyboard happily, although the broken pipe 
+ backslash key still doesn't work, and I haven't gotten round to 
sorting out the process of switching between the two different keyboard 
layouts at software level when I switch keyboards.

Unfortunately when I put the laptop back together the touchpad had 
stopped working! This is hopefully just a loose connection that I can 
fix by disassembling and reassembling it again. My cheap screwdrivers 
are starting to strip some of the screws, so I decided to deal with this 
another day.

On Wed, Sep 23, 2009 at 07:36:03PM +0100, chombee wrote:
> Ok, sticking to fixing my Alt keys for now. First I was wrong, Alt Gr is 
> working as it should, it allows me to type that | character that is the 
> third character on its key, and various other characters that are not 
> labelled on the keys. It does not function as an Alt modifier however 
> (of the kind that would let me Alt-Tab for example).
> 
> Keycodes from xev:
> 
> Left Alt: 64
> Alt Gr: 108.
> 
> They are the same keycodes for the built-in and the external keyboard. 
> So that's my first problem. The built-in keyboard has a stuck left alt 
> key so I have to disable keycode 64. I have to do this even when I'm 
> using my external keyboard, because the built-in keyboard is still there 
> pressing Alt by itself. Is there a way to disable keycode 64 or the 
> built-in keyboard only, or to disable the built-in keyboard entirely 
> when I'm using the external keyboard?
> 
> If there isn't then I think I'll have to lose my Alt key on the external 
> keyboard as well and remap something else (Caps Lock seems like the best 
> candidate on the external keyboard) to act as the Alt key should.
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
> 


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: My Alt keys don't work!

2009-09-23 Thread chombee
Ok, sticking to fixing my Alt keys for now. First I was wrong, Alt Gr is 
working as it should, it allows me to type that | character that is the 
third character on its key, and various other characters that are not 
labelled on the keys. It does not function as an Alt modifier however 
(of the kind that would let me Alt-Tab for example).

Keycodes from xev:

Left Alt: 64
Alt Gr: 108.

They are the same keycodes for the built-in and the external keyboard. 
So that's my first problem. The built-in keyboard has a stuck left alt 
key so I have to disable keycode 64. I have to do this even when I'm 
using my external keyboard, because the built-in keyboard is still there 
pressing Alt by itself. Is there a way to disable keycode 64 or the 
built-in keyboard only, or to disable the built-in keyboard entirely 
when I'm using the external keyboard?

If there isn't then I think I'll have to lose my Alt key on the external 
keyboard as well and remap something else (Caps Lock seems like the best 
candidate on the external keyboard) to act as the Alt key should.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: My Alt keys don't work!

2009-09-23 Thread Hugh Lawson
chombee  writes:

> Could someone help me sort out my keyboard configuration, or send me on
> the right track? I've investigated a little but I really don't know what
> to do. It's a somewhat tricky configuration.
>
> 1. I have two keyboards. The built-in one (it's a laptop), and an
> external one that I use. Since the keyboards are different no one
> configuration will work for both. Is it possible to have different
> configs for different keyboards?

You can do this with two different files for the xmodmap command. See
man xmodmap.

>From command line:

 xmodmap [options . . .] ~/laptop-keyboard
 or
 xmodmap [options . . .] ~/other-keyboard

To set up these files, you need some information about what keycodes
the keys are sending. You can get this with the xev command.

> 2. Since the built-in keyboard has a stuck left alt key (it presses
> itself all the time) I had to disable left alt using an Xmodmap file.
> But this also disables left alt on the external keyboard. Is there a way
> to disable the key on the built-in only?


Same advice as above. 

[ snip ]

This would be a *different* way of setting your keyboard
options from using Gnome-->System-->Preferences-->Keyboard. You would
be doing manually what the Gnome*Keyboard does semi-automatically.

Hope this helps.

Hugh







-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: My Alt keys don't work!

2009-09-23 Thread chombee
Apologies for sending this twice. I sent this one 'from' the wrong 
address, I assumed it wouldn't go through so I sent it again from the 
right address.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



My Alt keys don't work!

2009-09-23 Thread chombee
Could someone help me sort out my keyboard configuration, or send me on
the right track? I've investigated a little but I really don't know what
to do. It's a somewhat tricky configuration.

1. I have two keyboards. The built-in one (it's a laptop), and an
external one that I use. Since the keyboards are different no one
configuration will work for both. Is it possible to have different
configs for different keyboards?

2. Since the built-in keyboard has a stuck left alt key (it presses
itself all the time) I had to disable left alt using an Xmodmap file.
But this also disables left alt on the external keyboard. Is there a way
to disable the key on the built-in only?

3. Currently I've tried to get my single keyboard config working for the
external keyboard, but there are problems. Details follow. I apologise
for the length of this but, well, it's complicated and I wanted to give
as many relevant details as I could.

I'm running Debian testing on an OLPC XO-1 via DebXO, a build of Debian
for the XO-1. The XO-1 has a slightly unusual keyboard ofcourse, but the
DebXO image comes with a usable configuration for it. My keyboard has
the 'stuck alt key' problem where the left alt presses itself all the
time making the XO unusable, so I used an Xmodmap file to disable left
alt and turn the XO's left 'grab' key into an alt instead:

remove mod1 = Alt_L
keycode 64 =
keycode 115 = Alt_L Meta_L
add mod1 = Alt_L

This worked. Now I actually use the laptop with an external keyboard,
currently a UK-layout IBM Model M. I just plugged this keyboard in
(using a USB-PS2 adapter) and it worked, aside from various details of
course. The layout was wrong, so I had to press " to get an @ and so on,
and of course the Xmodmap unnecessarily disabled the left alt on the
external keyboard as well, although Alt Gr seemed to function as an alt
key.

When I upgraded from debian stable to testing it asked me various
questions about my keyboard configuration and the end result was the Alt
Gr on the external keyboard stopped functioning as well, and now I have
no alt keys!

I went into the Gnome keyboard prefs and set the keyboard to 'Generic
102 key (Intl) PC', I could not find IBM Model M in the list of
keyboards so I chose this generic one after counting the number of keys
(102). I set the layout to UK. Now all the keys seem to work, they do
what is shown on the keys themselves, except:

*   Neither Alt key functions. I used the program xev to find that
Alt on the external keyboard is keycode 64 and Alt Gr is 108.
Obviously my Xmodmap file is still disabling keycode 64. In the
Gnome keyboard shortcuts config tool Alt is recognised as "0x40" and
not seen as a modifier key, Alt Gr is not recognised at all. I tried
to use Xmodmap to remap Alt Gr to an alt instead of remapping the
XO's 'grab' key as before: `keycode 108 = Alt_L Meta_L` but this
doesn't work (Alt Gr still does nothing), so I changed my Xmodmap
back to as before.

*   There is a key in the top-left under Esc which has three labelled
functions and I can't use the third one (the pipe character). Maybe
cause you have to press Alt to get the third one?

*   There is a key near the bottom-left which is broken pipe and backslash,
this key doesn't function at all.

So all in all I can't use Alt, pipe or backslash, which makes things
fairly difficult, and I'm out of ideas.

Thanks in advance for any pointers.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



My Alt keys don't work!

2009-09-23 Thread Sean Hammond
Could someone help me sort out my keyboard configuration, or send me on 
the right track? I've investigated a little but I really don't know what 
to do. It's a somewhat tricky configuration.

1. I have two keyboards. The built-in one (it's a laptop), and an 
external one that I use. Since the keyboards are different no one 
configuration will work for both. Is it possible to have different 
configs for different keyboards?

2. Since the built-in keyboard has a stuck left alt key (it presses 
itself all the time) I had to disable left alt using an Xmodmap file. 
But this also disables left alt on the external keyboard. Is there a way 
to disable the key on the built-in only?

3. Currently I've tried to get my single keyboard config working for the 
external keyboard, but there are problems. Details follow. I apologise 
for the length of this but, well, it's complicated and I wanted to give 
as many relevant details as I could.

I'm running Debian testing on an OLPC XO-1 via DebXO, a build of Debian 
for the XO-1. The XO-1 has a slightly unusual keyboard ofcourse, but the 
DebXO image comes with a usable configuration for it. My keyboard has 
the 'stuck alt key' problem where the left alt presses itself all the 
time making the XO unusable, so I used an Xmodmap file to disable left 
alt and turn the XO's left 'grab' key into an alt instead:

remove mod1 = Alt_L
keycode 64 =
keycode 115 = Alt_L Meta_L
add mod1 = Alt_L

This worked. Now I actually use the laptop with an external keyboard, 
currently a UK-layout IBM Model M. I just plugged this keyboard in 
(using a USB-PS2 adapter) and it worked, aside from various details of 
course. The layout was wrong, so I had to press " to get an @ and so on, 
and of course the Xmodmap unnecessarily disabled the left alt on the 
external keyboard as well, although Alt Gr seemed to function as an alt 
key.

When I upgraded from debian stable to testing it asked me various 
questions about my keyboard configuration and the end result was the Alt 
Gr on the external keyboard stopped functioning as well, and now I have 
no alt keys!

I went into the Gnome keyboard prefs and set the keyboard to 'Generic 
102 key (Intl) PC', I could not find IBM Model M in the list of 
keyboards so I chose this generic one after counting the number of keys 
(102). I set the layout to UK. Now all the keys seem to work, they do 
what is shown on the keys themselves, except:

*   Neither Alt key functions. I used the program xev to find that 
Alt on the external keyboard is keycode 64 and Alt Gr is 108. 
Obviously my Xmodmap file is still disabling keycode 64. In the 
Gnome keyboard shortcuts config tool Alt is recognised as "0x40" and 
not seen as a modifier key, Alt Gr is not recognised at all. I tried 
to use Xmodmap to remap Alt Gr to an alt instead of remapping the 
XO's 'grab' key as before: `keycode 108 = Alt_L Meta_L` but this 
doesn't work (Alt Gr still does nothing), so I changed my Xmodmap 
back to as before.

*   There is a key in the top-left under Esc which has three labelled 
functions and I can't use the third one (the pipe character). Maybe 
cause you have to press Alt to get the third one?
  
*   There is a key near the bottom-left which is broken pipe and backslash, 
this key doesn't function at all.

So all in all I can't use Alt, pipe or backslash, which makes things 
fairly difficult, and I'm out of ideas.

Thanks in advance for any pointers.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org