Author Topic: Ir Keyboard Drivers - Alpha Release  (Read 52120 times)

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Ir Keyboard Drivers - Alpha Release
« Reply #75 on: June 30, 2006, 02:31:28 pm »
Oops. Looks like in the process of doing some website cleanup I accidentally nuked my rc11 feed. I think I have a backup tucked away on an offline machine. I'll try to get it back on the website this weekend.

On the off chance that the backup isn't recoverable, I encourage anyone who happens to have copies of the .ipks to PM me -- if I have to rebuild from source, it could be a while before I can get this restored.

Hrw

  • Hero Member
  • *****
  • Posts: 1366
    • View Profile
Ir Keyboard Drivers - Alpha Release
« Reply #76 on: June 30, 2006, 05:20:21 pm »
kopsis: any plans to get zkbdd working under 2.6 kernel?
OpenZaurus 3.5.4x Release Manager
OpenEmbedded, Ångström, Poky developer
My website

Misc embedded hardware.

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Ir Keyboard Drivers - Alpha Release
« Reply #77 on: June 30, 2006, 07:30:52 pm »
Quote
kopsis: any plans to get zkbdd working under 2.6 kernel?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=133539\"][{POST_SNAPBACK}][/a][/div]

Funny you should mention that. Things aren't looking good for my backup so I was just sitting wondering what to do about rebuilding. Unfortunately I have no idea which version of pdaXrom to target. Beta1 uses basically the Sharp kernels, Beta2 moved the C7X0 to some mystery 2.4.20 kernel. Beta3/Beta4 look to be 2.6 based but I have no idea about the specifics. And it sounds like there's a new beta in the works so kernels could change again.

I don't want to go through the time and trouble of building again for 2.4.x if that's likely to be a dead end. And the 2.6.x versions of pdaXrom aren't stable enough yet for me to spend time on. I could switch to OZ to maybe get a more stable 2.6.x, but I'll never find time to get over the build system learning curve. My hat's off to those of you who can keep up with the endless ROM shuffles ... I just don't have that kind of time these days :( I switched from a Linux desktop to a Mac early this year because I got tired of constant high maintenance updates and the associated system breakage. I'm sort of at the same point with the Zaurus.

I could rant on and on about what's wrong with the various ROMs, but I'll spare everyone the flame war that would be sure to follow. Suffices to say that until a ROM comes out that lets me update without a) trashing the way I had the last version set up, B) forcing me to reinstall a pile of applications, and c) forcing me to rebuild my own custom software because the kernel keeps changing, my Z will probably sit on the shelf.

As for Zkbdd, I don't know if I even will rebuild it at this point. My time may be better spent documenting how to build it and then leave it up to the various ROM maintainers to decide if they want to support it in their kernels and package the app for their feeds. Z development is just too much of a fragmented, aimless, poorly documented mess to entice me to commit much of my very sparse free time. That's a shame because it had so much potential.
« Last Edit: June 30, 2006, 07:31:50 pm by kopsis »

lazd

  • Newbie
  • *
  • Posts: 10
    • View Profile
Ir Keyboard Drivers - Alpha Release
« Reply #78 on: July 30, 2006, 02:58:14 pm »
Hey guys,
I have a Collie 5500 running OpenZaurus 3.5.4 (I know this is the wrong forum, but this is the only discussion I could find related to kbdd) and I have installed kbdd and uinput with success (obtained from the OZ3.5.4 feed, kbdd version .1) using the instructions in this thread (creating the /dev/misc/uinput dir and mknod). My only problem is this: When I run kbdd with the -d option, I can see press and release on my Belkin F8U1500 (NOT T) perfectly. When I simply run kbdd without the -d option, nothing happens upon keystoke. It seems the strokes are recognized, but just not turned into keyboard input.

Is there any way to solve this?

lazd

  • Newbie
  • *
  • Posts: 10
    • View Profile
Ir Keyboard Drivers - Alpha Release
« Reply #79 on: July 30, 2006, 03:17:19 pm »
Update: Upon restart, kbdd wasn't functional until I did "mkdir /dev/misc/" and "mknod /dev/misc/uinput c 10 223" and "ln -s /dev/misc/uinput /dev/uinput". Is there a way to make these commands permenant?

At this point, keystroke were registered when the -d option was enabled. Then, when I ran without the -d option, keystrokes were displayed on screen! The only problem is they are absolutley incorrect, nothing is mapped properly (left is $, up is ", right is _, ect). Should I be changing maps out for the F8U1500 or something? Any help is appreciated.

An interesing irony: The T key works perfectly on my F8U1500 (NOT T). I read previously in the thread that the non T models are not supported, should I just get to painstakingly mapping my own maps using the instructions in this thread?
« Last Edit: July 30, 2006, 03:28:51 pm by lazd »

lazd

  • Newbie
  • *
  • Posts: 10
    • View Profile
Ir Keyboard Drivers - Alpha Release
« Reply #80 on: July 31, 2006, 01:28:41 am »
Update: I installed zkbdd version .2 and got the recognition of scan codes using the test9600 driver, but am unable to even get incorrect input via the f8u1500t driver. I had to edit the f8u1500t.lua file and add quotes around all statements including hex, it would give a syntax error otherwise.

I am up for writing a driver for the f8u1500 if I can get this working, I bought the damn keyboard and I will not let my 20 bucks go to waste.

Please give any input you could possibly offer, it would be sweet if this page http://kopsisengineering.com/kopsis/ZkbddAddingKeyboards was finished, I wouldn't have to ask any questions. Re-writing a driver is pretty confusing via the description gave earlier in this thread.

Thanks!
« Last Edit: July 31, 2006, 01:29:31 am by lazd »

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Ir Keyboard Drivers - Alpha Release
« Reply #81 on: July 31, 2006, 08:24:26 am »
Quote
Update: I installed zkbdd version .2 and got the recognition of scan codes using the test9600 driver, but am unable to even get incorrect input via the f8u1500t driver. I had to edit the f8u1500t.lua file and add quotes around all statements including hex, it would give a syntax error otherwise.

Zkbdd was designed to use a patched version of the Lua interpreter that handles hex literals and bitwise operations. The zkbdd Lua scripts won't work with the standard OE version of Lua.

I'm actually in the process of getting all this going on OZ 3.5.4.1. I'm switching to using Lua 5.1 and a library for bitwise functions rather than patching the Lua core. Once that's done (and I've tweaked the scripts accordingly), it's just a matter of making the daemon look in the right spots for the uinput device and we should be good to go.

I'm going to be slammed the first half of this week but I may be able to get something going by towards the week's end. PM me your email address if you like and I'll send you ipks when the first beta is ready.

Hrw

  • Hero Member
  • *****
  • Posts: 1366
    • View Profile
Ir Keyboard Drivers - Alpha Release
« Reply #82 on: August 04, 2006, 03:01:59 am »
kopsis: If you need tosa/2.6 poodle/2.6 c7x0/2.6 testing then msg me and I will look.
OpenZaurus 3.5.4x Release Manager
OpenEmbedded, Ångström, Poky developer
My website

Misc embedded hardware.

Leinadmx

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Ir Keyboard Drivers - Alpha Release
« Reply #83 on: August 22, 2006, 10:57:53 am »
Hi,  good day.
I am using a 3100 with pdaXrom beta3 and the palm IRkeyboard 3169ww.
using zkbdd works fine!, but some key are wrong, I mean:

I read other posts and I took a look at /usr/share/zkbdd/drivers/palm_3169ww.lua, the file looks good, so I check the /usr/share/zkbdd/drivers/ztokens.lua and something seems tobe wrong there.

Becase, for example, when I press the "Shift right key" I got a ".", and if I press "period key" I got other character.
In the ztokens.lua file there is a kind of table that had relation of tokens and codes:
ZK_PERIOD = 64
...
ZK_SHIFTR = 103

but I changed it to: ZK_PERIODTMP = 64 ... ZK_PERIOD = 103

Only in that way I got a correct token link.

My doubt is, How was created th token table??
Where can I find the other symbols like "@", "&"??
Because they seems to be lost and I do not know how find them.

It looks like this:
IRkeyboard -> zkbdddriver -> palm_3169ww.lua -> ztokens (X seems to be wrong)-> Zaurus

Thanks a lot and Best Regards,

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Ir Keyboard Drivers - Alpha Release
« Reply #84 on: August 22, 2006, 11:36:33 am »
Quote
but I changed it to: ZK_PERIODTMP = 64 ... ZK_PERIOD = 103

Only in that way I got a correct token link.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=139401\"][{POST_SNAPBACK}][/a][/div]

Ok, the problem isn't in ztokens, it's in the scancode maps in the palm_3169ww.lua file. The way things work is that the palm_3169ww.lua file converts scancodes from the keyboard into a Zaurus keyboard scancode. When you hit "shift" on your kb, it's getting turned into ZK_PERIOD which is wrong. Changing ZK_PERIOD in ztokens just masks the problem and will break badly if you ever try to use a different keyboard.

What you need to do is edit palm_3169ww.lua and look at line 65. Note how the 7th entry on that line is "ZK_PERIOD". What that is telling zkbdd is that if it sees a 0x2e scancode, it should send the Zaurus the ZK_PERIOD scancode. Now, apparently on your keyboard it's "right shift" and not "period" that sends the 0x2e scancode. So you need to replace ZK_PERIOD on that line with ZK_SHIFTR. Similarly you need to find out what scancode your keyboard is sending when you press "period" and replace that entry in the "map_normal" list with ZK_PERIOD. You can see scancodes by running zkbdd in a terminal with the test9600 driver.

Once you get the hang of this, it becomes pretty easy to fix any misbehaving key without touching ztokens. Once you get it sorted out, send me a copy of your modified palm_3169ww.lua file and I'll incorporate it into the next release of zkbdd.

Leinadmx

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Ir Keyboard Drivers - Alpha Release
« Reply #85 on: August 24, 2006, 10:45:51 am »
Hi, good day
Sorry for write to you until now, but I could not yesterday.
Last night I was working with the keyboard again trying to fix some keys.

I followed the advice of Kopsis, I leave the ztokens.lua as original and work just on the palm_3169ww.lua.

On normal way it almost works with all keys now, but there is something wrong with the use of "Shift" and "Caps" keys, it is funny because sometimes the Shift key works like Caps.

But the problem (I guess) is with the map_shift array of the tokens, for example, when I press a key (with shift or caps mode), I get an scancode, it is ok, but when I look for the scancode in the map_shift it is 0 !!.

and example is with the key of the "@" I got an scancode of 0x79, and looking at the array it is 0, but it is funny because just a line before there is the token ZK_AT, at the scancode 0x71, the same occur with other keys using shift or caps.

I guess that this has a relation with others comments about that when they press a key like " they got a number, it seems that in normal way the zkbdd use a kind of "keycode & filter" in binary add,

Could that means we can only use some tokens just in shift or caps ??

I feel a little blind because I would like to use some keys but I do not know what token name match with that character.

Any advice??

or a little explication about how this works??

Thanks in advance and best regards.

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Ir Keyboard Drivers - Alpha Release
« Reply #86 on: August 24, 2006, 01:55:52 pm »
Quote
But the problem (I guess) is with the map_shift array of the tokens, for example, when I press a key (with shift or caps mode), I get an scancode, it is ok, but when I look for the scancode in the map_shift it is 0 !!.

Ok, the first thing I should point out is don't trust my maps  I don't have a Palm keyboard so the maps in the driver came from me trying to reverse engineer the keymaps using the IRK driver source code and fuzzy photos of the keyboard scrounged from various websites.

Quote
and example is with the key of the "@" I got an scancode of 0x79, and looking at the array it is 0, but it is funny because just a line before there is the token ZK_AT, at the scancode 0x71, the same occur with other keys using shift or caps.

That just means that I screwed up  Change the 0 to ZK_AT and change the ZK_AT to 0.

The way things work is if the driver sees a scancode with the shift key down, it looks up that scancode in the "map_shift" array. If there's a token there, the driver sends it. If there's a 0 there, the drivers sends "shift down, token from map_normal, shift up". The Zaurus is a little odd in that respect. For some characters is expects a shift token followed by the regular key token, for others (like "@") it has special dedicated tokens that must be sent without the shift key.

Quote
I feel a little blind because I would like to use some keys but I do not know what token name match with that character.

Basically the only tokens that need to be in the "map_shift" table are those that are already there. You may just need to move them around to get them matched to the right keys.

Note that the "function" maps are similar. If the function key is down, the driver looks up the scancode in the map_fn (or whatever I called it). If there's a token there, the driver sends it. But if there's a zero there, the driver sends nothing.

Leinadmx

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Ir Keyboard Drivers - Alpha Release
« Reply #87 on: August 28, 2006, 12:59:37 pm »
Hi, good day,

Last weekend I was working on palm_3169ww.lua config file, but I could not find the "@" symbol, I do not know which code is, I mean I know which key is pressed and the scancode got, but the problem is that no one ztoken seems works.
I tried using "xev" command and I got something like this:

Pressing "-" key from palmkeyboard  with "zkbdd -d swtich" I got:
(which gives scancode(normal_map,0x29)-> ZK_PLUS -> token 59):

Pressing "-" key from palmkeyboard with "xev" I got:
state 0x2000, keycode 67 (keysym 0x2d, minus), same_screen YES,
XKeysymToKeycode return keycode: 63
XLookupString gives 1 byte: (2d) "-"

It works fine, but the problem is with other symbols, for me the most important is "@" that I cannot find  I got this trying to get "@":

Pressing "@" key from palmkeyboard  with "zkbdd -d swtich" I got:
(which gives scancode(normal_map,0x79)-> ZK_AT -> token 61):

Pressing "@" key from palmkeyboard with "xev" I got:
state 0x0, keycode 67 (keysym 0x0, NoSymbol), same_screen YES,
XKeysymToKeycode return keycode:
XLookupString gives 0 byte:

I do not what to do or how the ztoken filter works, I guess that ztokens are translated to other keycodes which Zaurus gets.

Besides its funny that some scancodes works different if you use then in the map_normal or in map_shift.

Any advice please??, How could I know the way to get "@" symbol??

Best Regards,

SSG

  • Newbie
  • *
  • Posts: 16
    • View Profile
Ir Keyboard Drivers - Alpha Release
« Reply #88 on: October 16, 2006, 04:53:30 am »
Hi.  I rewrite key maps for targus and use zaur 760 with HP iPaq Bluetooth Keyboard (HighScreen).  Work fine.

Have next trouble with:

1) '^' cannot be input.
2) Caps Lock doesn't work by itself; I need to press Shift and Caps Lock down
at the same time to make it work.
3) 'Delete' not worked
4) Symbol ','  printed as '/' (mapped in corgy key map)

need create different keymaps and load it ?

xjqian

  • Sr. Member
  • ****
  • Posts: 497
    • View Profile
    • http://
Ir Keyboard Drivers - Alpha Release
« Reply #89 on: January 25, 2007, 07:20:25 am »
anybody has 2.4.18 kernel uinput module for tosa?
My Blog | 6000L Tosa + sled | is: Angstrom | was: pdaXrom 1.1.0beta1 | was: stock 1.12 rom + no-ffpe fash kernel + X/Qt Debian |
CF GPS (FGPCFCD01) | USB "Prolific 2303" GPS (USB-UG-200) | Socket CF BT rev. H |  USB "Pegasus II" Ethernet (ADM8511) | PocketTop IR kbd | sip:527630@fwd.pulver.com
Todo: OESF wiki | stable VOIP app | usable GPS app |      Wishlist: VOIP + Bluetooth | GPS + Routing Calc