|
Common key mapping (Was: [H2200-port] keboard, brightness with opie on h220: msg#00037linux.ports.h2200
Hi Paul, I think your suggestion is precious in order to minimize annoyances and wasted people work in the short term. After, in the mid term, I'd look at patches or helper apps in userland, so to to use freely the full key set available in the kernel input system. For indirect key names, we can use just final key names in iinput.h prepended by an _ , like _KEY_CONTACTS for KEY_CONTACTS and Contacts button. This level of indirection is already used internally in h2200_kbd driver. So it's ready for using your indirection scheme. Giorgio Alle 15:44, lunedì 7 agosto 2006, Paul Sokolovsky ha scritto: > So, yes, it's feasible and important to have common map. That's > common problem and deserves common solution. > > > iPAQs are keyboardless devices, but we can attach bluetooth keyboards or > > keypads with funny keys, maybe for music or else. So maybe it's better to > > not invade sets of keys with an expected behaviour. > > Well, you're right with this. But again, it doesn't really important > what exact mapping is used, what's important that it was common. That > way, one device won't be worse than another, and any fix and > improvement will benefit all devices. So, as you say, we have little > option now than to use Fn keys. After all, problem we face now is that > *builtin* buttons doesn't work over wide range of handhelds, so let's > solve that problem first, and leave external keyboards for after that - > it will be much easier to fix if there's common ground. > > Ok, so let's consider what we have/may have: > > 1. First of all, no matter what we mapping we have, we should add > proper level of indirection, so once we converted to common mapping, > it can be tweaked in one place. So, let there be <linux/input-pda.h> > which define constants with suitable prefix (like BTN_ or KEY_PDA_). > > 2. The least common denominator we haev is 6 buttons which *almost* > all devices has. These are: > > - Power button (a must) > - Record (most have; well, h2200 is one of the few exceptions) > - 4 app buttons > > So, just defining 6 standard codes for these buttons (for appbuttons > - as you suggest, from left to right, APP1...APP4, plus will need to > extra rules for funke layouts vendors just love outa there), and making > sure we have default mapping in appropraite userland (GPE/Opie), we'll > have working keys in all current and future ports. > > 3. But, appbuttons mapping will be funky for many devices. If you'd be > asked what 4 appbuttons do, what be your answer? For me, it's > Contacts, Calendar, Tasks, Memos. Old good Palm times, where is it?.. > Looking carefully at what button assignments are in PocketPCs produced > over years, gives a bit of shock - unorderdness and mess, each device > tries to invent its own pattern. After first shock fades out, some > pattern does appear still: it seems like there's 5 most common > functions - assigned to 4 keys. Order of buttons is arbitrary however > (i.e. buttons with same functions may be in different positions > spatially). So, what we have: > > - Almost all devices have Contacts and Calendar > - There're also Tasks, Mail(Internet, Sync, ...), and Home > (Taskman,...) > - Phone edition dveices have Answer/Hangup buttons and 2 app buttons > > 4. Phone edition devices usually have even more buttons, like Volume > Up/Down. Some devices have jogdial. > > > So, based on this, I propose: > > 1. We define mapping in terms of both button's position and function. > Position is rather a fallback method, for funky devices which have > just mad mappings. > > 2. Let the default correspondence between positional and functional to > be that of "golden age" iPaqs, i.e. h1900, h2200, h4000, hx4700. These > get F9-F12 keys. > > 3. Need to fugure out mapping for other keys. > > > All in all, that gives following draft <input-pda.h>: > ============= > #include <linux/input.h> > > #define KEY_PDA_POWER KEY_POWER > #define KEY_PDA_RECORD /* There's KEY_RECORD, but it's >127. Well, > h6300 uses it. Does it work? h6300.xmodmap > has keycode 8 = XF86AudioRecord ??? */ > > #define KEY_PDA_APP1 KEY_F9 > #define KEY_PDA_APP2 KEY_F10 > #define KEY_PDA_APP3 KEY_F11 > #define KEY_PDA_APP4 KEY_F12 > > /* Default functional mapping is those of h1900/h2000/h4000/hx4700 > iPaqs */ > #define KEY_PDA_CALENDAR KEY_PDA_APP1 > #define KEY_PDA_CONTACTS KEY_PDA_APP2 > #define KEY_PDA_MAIL KEY_PDA_APP3 > #define KEY_PDA_HOME KEY_PDA_APP4 > > #define KEY_PDA_TASKS /* assign */ > #define KEY_PDA_ANSWER /* assign */ > #define KEY_PDA_HANGUP /* assign */ > > #define KEY_PDA_VOLUMEDOWN KEY_VOLUMEDOWN > #define KEY_PDA_VOLUMEUP KEY_VOLUMEUP > > #define KEY_PDA_JOGUP /* assign, perhaps KEY_PAGEUP? */ > #define KEY_PDA_JOGDOWN /* assign, perhaps KEY_PAGEDOWN? */ > #define KEY_PDA_JOGACTION /* assign, perhaps KEY_KPENTER? */ > ============= > > > Giorgio |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: h2200_kbd: Remapping all 4 special keys to F9-F12 (Was: keboard, brightness with opie on h2200): 00037, Giorgio Padrin |
|---|---|
| Next by Date: | Re: v0.8.4-rc3 - wifi problem which doesn't exist under kernel 2.6.15-hh0: 00037, Joshua Layne |
| Previous by Thread: | Re: h2200_kbd: Remapping all 4 special keys to F9-F12 (Was: keboard, brightness with opie on h2200)i: 00037, Giorgio Padrin |
| Next by Thread: | Re: h2200_kbd: Remapping all 4 special keys to F9-F12 (Was: keboard, brightness with opie on h2200): 00037, Giorgio Padrin |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |