![]() ![]() |
Feb 9 2006, 06:28 PM
Post
#1
|
|
![]() Group: Members Posts: 1,248 Joined: 6-July 04 Member No.: 3,928 |
Ok, I have spend ages trying to get a better solution than the one below and if someone can correct me then I will be a happy guy.
It seems that the Caps flag (8) gets reset to 0 if another Shift value is present on the keyboard, Using xev you can definitely see that Fn+Tab generates Caps_Lock but the state only shows 0x80 (Fn generates that) instead of 0x88 as the keyboard toggle kicks in. I guess this is a limitation of how zkbd works My only solution to Caps_Lock in the meantime is to use that Japanese key next to the Minus key with an xmodmaprc as follows.. remove lock = Caps_Lock keycode 8 = Caps_Lock add lock = Caps_Lock It actually works reasonably well and is the only key that up until that point didn't have a use. So PLEASE if you have a better solution tell me. - Andy |
|
|
|
Feb 10 2006, 05:06 AM
Post
#2
|
|
![]() Group: Members Posts: 1,248 Joined: 6-July 04 Member No.: 3,928 |
btw if you want to have that key mapped to caps lock at the console then...
wsconsctl -w keyboard.map+="keycode 22=Caps_Lock" does the trick... still looking into getting it working properly though - Andy |
|
|
|
Feb 10 2006, 06:55 AM
Post
#3
|
|
![]() Group: Members Posts: 1,248 Joined: 6-July 04 Member No.: 3,928 |
I produced a proper fix for the Console, with this compiled in you will get Caps Lock using Fn+Tab.
http://marc.theaimsgroup.com/?l=openbsd-te...58309202645&w=2 now I need to take a look at the X keyboard drivers and since I have never built X on OpenBSD before it may take longer (read as "it's going to") to do the initial build than to find a fix The wskbd patch is also attached here for your convenience..
Attached File(s)
|
|
|
|
Feb 11 2006, 04:53 AM
Post
#4
|
|
![]() Group: Members Posts: 1,248 Joined: 6-July 04 Member No.: 3,928 |
And here's the fix I made for X11
http://marc.theaimsgroup.com/?l=openbsd-te...66203312579&w=2 heh, it took over night to build my initial X distribution before I could test the patch and post it.. Again for your convenience..
kbd.c.zauruscaps.patch.txt ( 363bytes )
Number of downloads: 46and a precompiled module against XOrg 6.9 from 3.9 beta (-current) make sure you rename it to kbd_drv.so and it goes into /usr/X11R6/modules/input (rename original first as your safety backup).
kbd_drv.so.txt ( 14.89K )
Number of downloads: 78and the md5sum for that file..
kbd_drv.so.md5sum.txt ( 45bytes )
Number of downloads: 33 |
|
|
|
Feb 11 2006, 05:31 AM
Post
#5
|
|
![]() Group: Members Posts: 1,248 Joined: 6-July 04 Member No.: 3,928 |
Oh, I forgot to mention, since the X keyboard driver handles Caps state independently of the console driver, if you only want Caps in X then you shouldn't need to build the kernel with the patch.
I had a reponse also from Moid Vallat acknowledging the fix for the console so expect that either my fix or one he suggested will eventually get committed to the kernel CVS. Only just posted the X fix so we shall see if we get any responses - Andy |
|
|
|
Sep 10 2006, 03:21 PM
Post
#6
|
|
![]() Group: Members Posts: 298 Joined: 8-July 06 From: United Kingdom for now.... Member No.: 10,349 |
The path stated below in post # 4 of this thread should be /usr/X11R6/lib/modules/input
QUOTE(iamasmith @ Feb 11 2006, 12:53 PM) and a precompiled module against XOrg 6.9 from 3.9 beta (-current) make sure you rename it to kbd_drv.so and it goes into /usr/X11R6/modules/input (rename original first as your safety backup).
|
|
|
|
Sep 16 2006, 10:23 AM
Post
#7
|
|
![]() Group: Members Posts: 298 Joined: 8-July 06 From: United Kingdom for now.... Member No.: 10,349 |
To apply Andy's CAPS_LOCK console patch I just copied zauruscaps_wskbd.c.patch to /usr/src/sys/dev/wscons/ and then followed Andy's directions in the quote below:
QUOTE apply the patch in wscons directory with:
patch -p0 < zauruscaps_wskbd.c.patch Then compile and install the kernel as usual. -Andy |
|
|
|
Sep 17 2006, 02:02 AM
Post
#8
|
|
![]() Group: Members Posts: 1,248 Joined: 6-July 04 Member No.: 3,928 |
ok, I mailed the tech@ group last night and got a response from Theo, initially the response was..
QUOTE Wierd. I've never seen this (these) patches before. and after he did a little more digging, when I mentioned that Miod had also proposed a an alternate fix... QUOTE There are large problems with our wscons keymap stuff not being able to deal with that nightmare of a keyboard. It is rather ugly to deal with. Yes, talk to him in a few weeks, and keep talking to him every 2-3 weeks. A translation of that for the folks that haven't spent time with the wscons source code is really that wscons (as is most of the Kernel source) is actually quite cleanly and simply implemented. It is good clean code, nicely written and easily read but doesn't handle the case scenario for wierd keyboards that don't have dedicated lock keys such as Caps or Num lock. My fix implements the Caps Lock in an early part of wscons and duplicates some effort that the wscons driver performs a little later so it is feasible that a good rework of wscons could handle this keyboard and a few others in a nice clean manner that doesn't offend the standards of the project. For now that means that the patch is 'apply it seperately' if you need it and if you don't then don't bother. Note that the code we are considering for the wscons fix is core OpenBSD code and nothing specific to the Zaurus... Zaurus specific hacks for certain things would be ugly and perhaps only just bearable in the Zaurus specific portions of the tree, however, they would clearly be unacceptable in the main portion of the source tree. X is a different matter, however, it seems that very few folks like the XOrg source and Theo makes no comment on that patch. XOrg uses raw keyboard handling and manages Caps Lock state independently of the Kernel state which is ugly in its own right.. it may be that Matthieu who maintains the XOrg part of OpenBSD could be swayed to take a look at the patch, however, I acknowlege that it is a little ugly in the way that it works and he may not have much time to fix it in a cleaner way. For now the message really is if you want Caps Lock under Console and or X, consider implementing these patches. -Andy |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 18th May 2013 - 04:53 PM |