Incorrect keyboard mapping
Bug #373767 reported by
ecishere
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tiemu (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: tiemu
Some keys are mapped incorrectly (ie. arrow keys)
Using kbd_dbg=yes option, some keys are incorrectly defined.
For example, when the left arrow key is pressed output is 'pckey = 71 ()' meaning this is an unrecognised key.
Output should be 'pckey = 71 (PCKEY_LEFT)'
Alphanumeric keys (A-Z,0-9) seem to work, except for 'f' key. Other keys (HOME, PGDN, PGDN, END, arrow, etc.) are incorrectly mapped.
Specifically, pckeys.h in ./src/gui/calc needs to be modified, or another fix.
This behavior appeared since 8.10 and occurs in current release, 9.04
To post a comment you must log in.
This is because of the way tiemu handles key press and releases. The mapping for hardware keycodes is hardcoded in src/gui/ calc/pckeys. h. Unfortunately, this mapping may differ. That's why certain keys are not working. Furthermore, on my swiss german keyboard, y and z is swapped. Unfortunately, there is no easy solution for this. However, I came up with the following fix:
1.) Use keyvalues instead of hardware keycodes
2.) Add more mappings for instance for the decimal point and the comma
My changes are available in my PPA at https:/ /launchpad. net/~launchpad- weyland/ +archive/ ppa
To solve the mapping problem, it would only be necessary to implement 1.) in theory. However, I found it extremely annoying not to be able to enter parenthesis, decimal points, pipes etc. with my keyboard. That's why I also implemented 2.). Unfortunately, some important characters like + and * are mapped on top of the numbers on my keyboard and have to be used together with the shift key. This interfers with the way how the calculators handle that key, that's why I disabled the right shift key. Thus, I can use the left shift key for capital letters and the right one for the operators. I also mapped the "second" button to the super ("windows") key because the menu key seems to be used for the context menu.
My changes are based on the current tiemu version 3. Version 2 in ubuntu is seriously outdated and should be replaced anyway (see LP 221332). The PPA may be of use to anyone who needs proper keyboard mappings and for those who may want to adopt my changes. However, the patch needs a cleanup! First, It's going to break any build except for linux, and second, some variables have to be renamed (hardware_keycode is just misleading if we're not dealing with keycodes anymore) and some more mappings have to be added. I'm only using OS 2 for TI-89, so I don't know whether I introduced any bugs for other ROMs. I'm willing to improve the patch if some maintainers decide they want to adopt it, but I have not done so yet because it's working good enough for me.
regards
Matt