Caps Lock and Zaurus

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Caps Lock and Zaurus

asmith-4
Ok, try as I might, and I may be missing something really obvious here I
can't get Caps Lock to work on my Zaurus either with the original Fn+Tab key
combination or a Control or Shift combination using xmodmap.

The closest I can get to useable functionality is to use xmodmap with the
following rc..

remove lock = Caps_Lock
add keycode 8 = Caps_Lock
add lock = Caps_Lock

This adds the Caps_Lock to the Japanese key nearest the - symbol

The strange thing is that Fn+Tab generates a discreet keycode and is
correctly mapped, however, it doesn't generate the Caps_Lock behaviour.

I was wondering if something in zts or thereabouts was blocking the
Caps_Lock because Fn is used to chord mouse events when tapping with the
stylus so I tried an alternate mapping as follows...

Keycode 8 = ISO_Level3_Shift

Sure enough this keypress didn't generate the chording on the stylys tap but
did generate the Level3 shift required, so I went into xev and used this key
+Tab and saw Caps_Lock coming through.... it STILL doesn't produce Caps_Lock
behaviour though :(

I would SO like to find a way of mapping Caps_Lock to its intended location
on the keyboard and particularly once it's running through X to get it
running with wsconsctl too.

Does anybody know what is happening in the wscons framework that is stopping
this taking effect? - I will trawl the Kernel source but a pointer in the
right direction would really be appreciated.

- Andy

Reply | Threaded
Open this post in threaded view
|

Re: Caps Lock and Zaurus

Stuart Henderson
On 2006/02/10 11:07, Andrew Smith wrote:
> Ok, try as I might, and I may be missing something really obvious here I
> can't get Caps Lock to work on my Zaurus either with the original Fn+Tab key
> combination or a Control or Shift combination using xmodmap.

Same outside of X.

> Does anybody know what is happening in the wscons framework that is stopping
> this taking effect?

On a PC the keyboard controller is somewhat intelligent and
I think it handles things like capslock for you. On the Zaurus you
have to do a lot more yourself - the keyboard is just a load of
GPIO that you get to scan yourself.

> I will trawl the Kernel source but a pointer in the
> right direction would really be appreciated.

/sys/arch/zaurus/dev/zaurus_kbd.c - I guess this bit's just not
written yet.

Reply | Threaded
Open this post in threaded view
|

Re: Caps Lock and Zaurus

asmith-4
Thanks Stuart,

I will go back to that in a while if I don't find what I'm looking for in
wskbd. That actually seems to handle modifiers and in particular lock toggle
states for those modifiers (/src/sys/dev/wscons/wskbd.c(update_modifier)).

- Andy

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Stuart Henderson
Sent: 10 February 2006 12:08
To: Andrew Smith
Cc: 'OpenBSD Arm Mailing List'
Subject: Re: Caps Lock and Zaurus

On 2006/02/10 11:07, Andrew Smith wrote:
> Ok, try as I might, and I may be missing something really obvious here I
> can't get Caps Lock to work on my Zaurus either with the original Fn+Tab
key
> combination or a Control or Shift combination using xmodmap.

Same outside of X.

> Does anybody know what is happening in the wscons framework that is
stopping
> this taking effect?

On a PC the keyboard controller is somewhat intelligent and
I think it handles things like capslock for you. On the Zaurus you
have to do a lot more yourself - the keyboard is just a load of
GPIO that you get to scan yourself.

> I will trawl the Kernel source but a pointer in the
> right direction would really be appreciated.

/sys/arch/zaurus/dev/zaurus_kbd.c - I guess this bit's just not
written yet.

Reply | Threaded
Open this post in threaded view
|

Re: Caps Lock and Zaurus

asmith-4
Actually it is sensible when you think about it... caps state must be stored
independently of a toggled caps lock device otherwise you wouldn't be able
to store caps lock on another key.. i.e.

wsconsctl -w keyboard.map+="keycode 22=Caps_Lock"

(maps Caps_Lock onto Right Japanese key, and it works!).

- Andy

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Andrew Smith
Sent: 10 February 2006 13:12
To: 'Stuart Henderson'
Cc: 'OpenBSD Arm Mailing List'
Subject: Re: Caps Lock and Zaurus

Thanks Stuart,

I will go back to that in a while if I don't find what I'm looking for in
wskbd. That actually seems to handle modifiers and in particular lock toggle
states for those modifiers (/src/sys/dev/wscons/wskbd.c(update_modifier)).

- Andy

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Stuart Henderson
Sent: 10 February 2006 12:08
To: Andrew Smith
Cc: 'OpenBSD Arm Mailing List'
Subject: Re: Caps Lock and Zaurus

On 2006/02/10 11:07, Andrew Smith wrote:
> Ok, try as I might, and I may be missing something really obvious here I
> can't get Caps Lock to work on my Zaurus either with the original Fn+Tab
key
> combination or a Control or Shift combination using xmodmap.

Same outside of X.

> Does anybody know what is happening in the wscons framework that is
stopping
> this taking effect?

On a PC the keyboard controller is somewhat intelligent and
I think it handles things like capslock for you. On the Zaurus you
have to do a lot more yourself - the keyboard is just a load of
GPIO that you get to scan yourself.

> I will trawl the Kernel source but a pointer in the
> right direction would really be appreciated.

/sys/arch/zaurus/dev/zaurus_kbd.c - I guess this bit's just not
written yet.

Reply | Threaded
Open this post in threaded view
|

Re: Caps Lock and Zaurus

asmith-4
OK, I think I have found what is happening...

The wskbd calls a translation table which returns the translation keycodes
for each key in a multidimensional array... for each key in the array you
have..

Unshifted State, Shifted State, ISO_Shift_State3 (pressing Fn on Zaurus
keyboard).

There is a routine that calls update_modifier in wskbd after getting the
translation table for the keycodes back. It does this with a switch
statement on the translated key table, however it only uses Element 0 of the
table, the unshifted state.

Will attempt a clean fix.

- Andy

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Andrew Smith
Sent: 10 February 2006 13:22
To: 'Stuart Henderson'
Cc: 'OpenBSD Arm Mailing List'
Subject: Re: Caps Lock and Zaurus

Actually it is sensible when you think about it... caps state must be stored
independently of a toggled caps lock device otherwise you wouldn't be able
to store caps lock on another key.. i.e.

wsconsctl -w keyboard.map+="keycode 22=Caps_Lock"

(maps Caps_Lock onto Right Japanese key, and it works!).

- Andy

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Andrew Smith
Sent: 10 February 2006 13:12
To: 'Stuart Henderson'
Cc: 'OpenBSD Arm Mailing List'
Subject: Re: Caps Lock and Zaurus

Thanks Stuart,

I will go back to that in a while if I don't find what I'm looking for in
wskbd. That actually seems to handle modifiers and in particular lock toggle
states for those modifiers (/src/sys/dev/wscons/wskbd.c(update_modifier)).

- Andy

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Stuart Henderson
Sent: 10 February 2006 12:08
To: Andrew Smith
Cc: 'OpenBSD Arm Mailing List'
Subject: Re: Caps Lock and Zaurus

On 2006/02/10 11:07, Andrew Smith wrote:
> Ok, try as I might, and I may be missing something really obvious here I
> can't get Caps Lock to work on my Zaurus either with the original Fn+Tab
key
> combination or a Control or Shift combination using xmodmap.

Same outside of X.

> Does anybody know what is happening in the wscons framework that is
stopping
> this taking effect?

On a PC the keyboard controller is somewhat intelligent and
I think it handles things like capslock for you. On the Zaurus you
have to do a lot more yourself - the keyboard is just a load of
GPIO that you get to scan yourself.

> I will trawl the Kernel source but a pointer in the
> right direction would really be appreciated.

/sys/arch/zaurus/dev/zaurus_kbd.c - I guess this bit's just not
written yet.

Reply | Threaded
Open this post in threaded view
|

Re: Caps Lock and Zaurus

asmith-4
OK, I fixed it in the console... looks like I need to take a look at the X
Keyboard driver too though :(

Patches soon :)

- Andy

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Andrew Smith
Sent: 10 February 2006 13:38
To: 'Andrew Smith'; 'Stuart Henderson'
Cc: 'OpenBSD Arm Mailing List'
Subject: Re: Caps Lock and Zaurus

OK, I think I have found what is happening...

The wskbd calls a translation table which returns the translation keycodes
for each key in a multidimensional array... for each key in the array you
have..

Unshifted State, Shifted State, ISO_Shift_State3 (pressing Fn on Zaurus
keyboard).

There is a routine that calls update_modifier in wskbd after getting the
translation table for the keycodes back. It does this with a switch
statement on the translated key table, however it only uses Element 0 of the
table, the unshifted state.

Will attempt a clean fix.

- Andy

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Andrew Smith
Sent: 10 February 2006 13:22
To: 'Stuart Henderson'
Cc: 'OpenBSD Arm Mailing List'
Subject: Re: Caps Lock and Zaurus

Actually it is sensible when you think about it... caps state must be stored
independently of a toggled caps lock device otherwise you wouldn't be able
to store caps lock on another key.. i.e.

wsconsctl -w keyboard.map+="keycode 22=Caps_Lock"

(maps Caps_Lock onto Right Japanese key, and it works!).

- Andy

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Andrew Smith
Sent: 10 February 2006 13:12
To: 'Stuart Henderson'
Cc: 'OpenBSD Arm Mailing List'
Subject: Re: Caps Lock and Zaurus

Thanks Stuart,

I will go back to that in a while if I don't find what I'm looking for in
wskbd. That actually seems to handle modifiers and in particular lock toggle
states for those modifiers (/src/sys/dev/wscons/wskbd.c(update_modifier)).

- Andy

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Stuart Henderson
Sent: 10 February 2006 12:08
To: Andrew Smith
Cc: 'OpenBSD Arm Mailing List'
Subject: Re: Caps Lock and Zaurus

On 2006/02/10 11:07, Andrew Smith wrote:
> Ok, try as I might, and I may be missing something really obvious here I
> can't get Caps Lock to work on my Zaurus either with the original Fn+Tab
key
> combination or a Control or Shift combination using xmodmap.

Same outside of X.

> Does anybody know what is happening in the wscons framework that is
stopping
> this taking effect?

On a PC the keyboard controller is somewhat intelligent and
I think it handles things like capslock for you. On the Zaurus you
have to do a lot more yourself - the keyboard is just a load of
GPIO that you get to scan yourself.

> I will trawl the Kernel source but a pointer in the
> right direction would really be appreciated.

/sys/arch/zaurus/dev/zaurus_kbd.c - I guess this bit's just not
written yet.