Numlock key doesn't work on IBM t42

Bug #35080 reported by Claire Davis
16
Affects Status Importance Assigned to Milestone
xkeyboard-config (Ubuntu)
Fix Released
High
Paul Sladen

Bug Description

The Numlock key on the internal keyboard of my T42 no longer works in X since upgrading to Dapper. It does however both work on the console and in X with an external USB keyboard.

Revision history for this message
Paul Sladen (sladen) wrote :

By default X (ab)uses the NumLock key to switch the number pad keys into Mouse-emulation mode, where the number keys control the pointer.

On the ThinkPads, the sequence:

  Shift-ScrLock

produces the NumLock key (code 77). This needs to be mapped by the correct behaviour in X, in this case with:

  xmodmap -e 'keycode 77 = Num_Lock'

I'm not sure how to get this automatically loaded for ThinkPads. I tried doing hacks in 'hotkey-setup', since that already has code to detect the model of computer, but that seems to make things things worse.

The long-term solution may well be just to have NumLock do what NumLock should do, rather than abusing it to do another function. Especially since the accessibility frameworks have better of exposing the control this functionality.

Changed in xorg:
status: Unconfirmed → Confirmed
Revision history for this message
Paul Sladen (sladen) wrote :

This current X mapping is defined by:

  /etc/X11/xkb/keycodes/xfree86:
  <NMLK> = 77;

and then:

  /etc/X11/xkb/symbols/pc:
  key <NMLK> { [ Num_Lock, Pointer_EnableKeys ] };

I think I now understand what's happening; Internally the ThinkPad controller is converting Shift+ScrLock to NumLock, but of course the Shift is still getting passed through to X, so this is what eventually gets us the:

  Shift+NumLock

key-event, when it shouldn't be. Mmmm.

Revision history for this message
Paul Sladen (sladen) wrote :

Discussion on #ubuntu-devel with sladen, Mithrandir and henrik, no real conclusion.

  The actual bug is with the ThinkPad designs who never expected anyone to use 'Shift-NumLock' so didn't design around it. (Note, the new LenovoPads use Fn-ScrLck instead of Shift-ScrLck).

  Shift+NumLock is an accessibility feature, it's also for when you don't have a mouse, so shouldn't need a mouse to activate it.

  Off-topic, the gnome-menu can't be opened with Ctrl-Escape of the 'Logo' key---which would allow the following to be reached:

  System->Settings->Keyboard->Accessibility->Mouse can be used to toggle the current MouseKeys state.

Options:

  Remove the X policy decision of mapping Shift-NumLock by default to an action. (eg. allow it only to be enabled through the GUI menu, with NumLock five-times-in-row, or via ticking a box "[x] Make Shift-NumLock activate Mousekeys".

  Remap '77' to something completely different on ThinkPads in 'hotkey-setup' and then unremap it again with a new entry in the X keymap. (Note, any solution like this breaks Shift-NumLock on an external [eg. USB] keyboard anyway).

  If keymaps could be placed on only 'atkbd' input device then remapping/fiddling would only set the internal ThinkPad keyboard. This could do some fiddling like eat the key-stroke then send: shift-up, numlock down, numlock up, shift-down.

Simplest:

  Remove 'Pointer_EnableKeys' in all cases and see if anyone actually complains.

  Detect if it's a ThinkPad in 'xserver-xorg' postinst and add/remove an extra:
      -option "mousekeys:shiftnumlock"

Revision history for this message
Reinhard Tartler (siretart) wrote :

is this accessibility feature (shift-numlock) somewhere advertised? I never heard about that before, and I find it very uncomfortable to use, espc. because the pointer moves so dead slow to be barely useful.

If it isn't that advertised, how about moving the combination from shift-NumLk to shift-pause? This would even thinkpad users enable to use it with the internal keyboard

Revision history for this message
Paul Sladen (sladen) wrote :

Not that I know of. I suspect the people who have heard of it might also know how to enable it :)

Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

It shouldn't be shift- or ctrl- anything. It's not useful to have a code that requires you to press two keys at once when many in the potential user group are not able to do that.

The standard code 5*NumLock and 5*Shift for sticky keys. This is not a sequence you would ever have any reason to press under other circumstances. Ideally this possibility should even be available at the GDM.

Revision history for this message
Reinhard Tartler (siretart) wrote :

ok. this implies that we should drop 'Pointer_EnableKeys' in all cases as sladen suggests now, and make the lack of the accesibility feature a new bug.

objections?

Revision history for this message
Paul Sladen (sladen) wrote :

Lets do it. If this causes people issues and requires further follow-up we can re-open it.

 xkeyboard-config (0.8-5) dapper; urgency=low
 .
   * Experimentally remove the default Shift-NumLock=>Pointer_EnableKeys
     (aka MouseKeys) policy so that NumLock works on ThinkPads (which send
     Shift+NumLock). If this causes problems for a large number of people
     it can be investigated. [Malone: #35080]

Changed in xkeyboard-config:
assignee: nobody → sladen
status: Confirmed → Fix Released
Revision history for this message
David Jaša (dejv) wrote :

This is not yet fixed in current 7.10 beta. Does anybody work on this?

Revision history for this message
Anibal Sanchez (anibal-sanchez) wrote :

I HATE THIS BUG!

It's the worst usability bug I have found in the system. All my users are complaining about it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.