Pandora Keyboard Layout


Tempel said:
Esn said:
This would actually be a really useful feature to add to the OS... simple key re-assignment would make the Pandora a much better experience as it would make accessible a whole lot of programs that have badly-assigned keys. For example, DOSBox.
I hadn't realized, but that's probably a clever quick-fix to those poorly-mapped games you mentioned. More reason to convince skeezix to make this easy to do.

I'll third that. Sounds a good inclusion to the firmware in some gui form for those that wish to alter things to make some apps more comfortable.
 
Last edited by a moderator:
xmodmap would probably solve the problem, no need to go into complex solutions, I should think.
 
WizardStan said:
xmodmap would probably solve the problem, no need to go into complex solutions, I should think.
I assume you mean complex for coders, rather than for users? Because messing around with the command line is certainly more complex for users. ;)

(Also, one of the things I was eventually hoping to use my Pandora for was to write in Russian. For this, I would need to assign each key to a completely different letter, then save that as a configuration. Then I could cycle between them easily by pressing a key combination, like it is done in Windows.)
 
Last edited by a moderator:
WizardStan said:
xmodmap would probably solve the problem, no need to go into complex solutions, I should think.
Jey created a modified version of pnd_run.sh that searches for scripts named "pre.sh" and "post.sh" in appdata, running them before and after (respectively) the PND is executed. So, you could create a pre script for a single app, using xmodmap to change the controls, then have the post script change them back. It's not that complicated, but it would be tedious to do like that for every app, and I expect many users would not find it very intuitive. There's probably a better way if all you want is per-app temporary keyboard remapping.
 
Last edited by a moderator:
Tempel said:
Jey created a modified version of pnd_run.sh that searches for scripts named "pre.sh" and "post.sh" in appdata, running them before and after (respectively) the PND is executed. So, you could create a pre script for a single app, using xmodmap to change the controls, then have the post script change them back. It's not that complicated, but it would be tedious to do like that for every app, and I expect many users would not find it very intuitive. There's probably a better way if all you want is per-app temporary keyboard remapping.
I can't imagine a better way. It's per-app, every configuration is going to be mostly unique. Or there'll be a lot of overlap in which case you can keep reusing the same pre.sh and it'd be easy. Either the developer takes the time to fix the controls in the program, or the end user has to do it.
 
Last edited by a moderator:
Ok, I PM'd skeezix about it. I think this conversation and my proposal should be public, so I'm copy+pasting it here.

skeezix said:
If you mean .. building an official way for pnd_run.sh to do pre- and post- run jobs, so you can roll your own xmodmap scripts, etc.. I posted in a couple of those threads; I'm not sure how edge-case it is, but its not hard to build. We've talked over a few approaches in IRC and I've unofficially asked sebt3 to champion it a bit -- gather up the ideas (theres my approach and other guys approch and a third approach, I think), and go with one; he's our pnd_run.sh maintainer really, so its up to him.

If you mean something else, be clear.. I'm really tired out right now :)

If you like, open a ticket in the bugtracker as a feature request and note the idea down, so it doesnt just all and get forgotten :)

jeff

My reply:
Hi skeezix, thanks for reading. :) Thing is, I'm not entirely sure what the correct technical way to describe what I'm asking is.

I'll just describe it by what I would see as the end-user:

1. In the Pandora start menu, perhaps under "system" or "settings", there is an option I can click on called "key config".
2. When I click on it, a window comes up giving me the option to EITHER choose between adjusting existing configs (at first, there would only be the default one) OR create a blank, new key config. Like with gamma, basically.
3. If I click, "add new", an image pops up with a reproduction of the Pandora controls, looking something like this: http://geo.hmg.inpg.fr/~janek/pan/printed_layout.svg (with labels also added to the directions of the nubs and d-pad)
4. I can then use the stylus to EITHER click on the key/nub that I want to change from the default settings (if I only want to make minor changes, i.e. switching the right nub and A/B/X/Y settings, as a number of people want to do, or switching A/B/X/Y with Enter/Space/Shift/Ctrl to make badly-keymapped Pandora software playable), OR I have an option to remove ALL assignments and start a new key config from scratch (the function of stylus input can never be changed; that way, nobody can screw up and accidentally save a config that won't allow them to do anything on their Pandora; at least the stylus will still work).
5. When you click on a key on the screen to assign a new function to it (and secondary/tertiary function, as well - what you'd get by holding Shift or Fn keys...), you're given the option EITHER to simply exchange the functions of two existing keys (so if I want to exchange "A" and "Enter", I would click on the "A" on the image on the screen, it would ask me to press the key I'd like to exchange it with, I'd press "Enter") - this would be what most people would use, probably, OR you can entirely delete its current function and assign another one to it, including unicode characters (so let's say I want to type in another language on my Pandora, I'd delete everything, and assign each key to some unicode character from my language instead.) (also "mouse movement" can only be assigned to either the entire left or right nub, and takes up all 4 directions on it)
6. After you're done, the IMAGE of the Pandora Keyboard Layout on the screen CHANGES, so you can visibly see the changes you've made
7. You can click "save config". If you have more than one config, the program forces you to create a key-combination-shortcut that you can use to cycle between them (whatever your config is, this key-combination will be the same).

I hope I explained that clearly enough... what do you guys think? Can something like this be added to "bug reports" as a feature request?

P.S. If you like, I could try making an animation in Flash to show what it would look like - if that would make it easier to visualize.
 
That is a lot of work (to produce a GUI based key-editor); the proper place to log a feature request is the 'bug' tracker, and hope someone has the cycles to jump on it (or perhaps you could try to drum someone up :) Really what we've got is 'basic, but workable' scripted UIs, and then someday we can grow them up to fancy UI control panels..

So same here -- the actual Goal is 'I need to be able to swap between a few templates for input' (hell, could even tie nub-mode to it, so you coudl switch keyb+nub in one fell swoop, if a game needs it :p) ..

Phase 1 -- a popup list of known templates; if you want ot make a new one up, hand edit it. <- pretty easy option (Assuming we're just swapping xmodmap's say)
Phase n -- a fancy editor approach to create templates

I'd log that as a feature request after its rolled around here a bit for discussion; don't forget to post it to the tracker, lest it get lost :)

jeff
 
WizardStan said:
Tempel said:
Jey created a modified version of pnd_run.sh that searches for scripts named "pre.sh" and "post.sh" in appdata, running them before and after (respectively) the PND is executed. So, you could create a pre script for a single app, using xmodmap to change the controls, then have the post script change them back. It's not that complicated, but it would be tedious to do like that for every app, and I expect many users would not find it very intuitive. There's probably a better way if all you want is per-app temporary keyboard remapping.
I can't imagine a better way. It's per-app, every configuration is going to be mostly unique. Or there'll be a lot of overlap in which case you can keep reusing the same pre.sh and it'd be easy. Either the developer takes the time to fix the controls in the program, or the end user has to do it.
Doesn't xmodmap change the keybinding globally rather than per process? If so, then this approach would break if you start two applications with conflicting keyboard layouts simultaneously (e.g. a game and an application to take notes).

In my opinion binding directly to the keycode rather than the keysym would be preferred for games and emulator (though it's a bit trickier to do).

By the way, to make a GUI based key-editor is actually on my todo-list. There are just too many annoyances and in my opinion errors with the default keyboard layout. Poor modifier and key placement e.g. Alt+TAB gets disabled by just about any game, shift+del is impossible. Some unneeded symbols which should have been alt graphs (paragraph sign? :huh: ) etc.

I'll try to take a look at it this weekend, but I'm rather busy so no promises and I can't give any deadlines for completion either.
 
Last edited by a moderator:
Using the nubs to do L/R click has been quite unreliable of both my first and replacement units. I fully support the notion to be able to reconfigure this at least :)
 
Caine said:
Doesn't xmodmap change the keybinding globally rather than per process? If so, then this approach would break if you start two applications with conflicting keyboard layouts simultaneously (e.g. a game and an application to take notes).
Yes it would, so you would necessarily have to only run one application that does such keybinds at a time. Which should be fine; typically you would only need to do so with games or emulators running full screen anyway, eh?
The only other solution, like I said, would be for the developer to change the code. Of course, if every developer did this automatically, we wouldn't be having this discussion. :p It's just developer laziness, and I'm guilty of this as well.

Caine said:
In my opinion binding directly to the keycode rather than the keysym would be preferred for games and emulator (though it's a bit trickier to do).
That makes it a lot less portable, and completely removes the users ability to make any changes (via xmodmap) unless the developer has given explicit control over key bindings, but again, if the developers/porters added the ability to change keybindings to the program itself we wouldn't be having this discussion.

So to reiterate, this should not be considered a catch-all solution, it is for the cases where the application has been lazily ported to use the original key bindings with no way of changing it. If the application already supports changing the keys, then that should be the preferred method.
 
Last edited by a moderator:
WizardStan, I agree with your last post. I do this all the time in Windows, anyway. Here I'll type in English, then I'll go to a Russian-language forum, press Alt+Shift, and type in Russian on the same keyboard. Then press Alt+Shift again to switch back. I don't see why it would be any less comfortable on the Pandora.

Caine said:
By the way, to make a GUI based key-editor is actually on my todo-list. There are just too many annoyances and in my opinion errors with the default keyboard layout. Poor modifier and key placement e.g. Alt+TAB gets disabled by just about any game, shift+del is impossible. Some unneeded symbols which should have been alt graphs (paragraph sign? :huh: ) etc.

I'll try to take a look at it this weekend, but I'm rather busy so no promises and I can't give any deadlines for completion either.
Thanks Caine. I wish you luck!

skeezix said:
Phase 1 -- a popup list of known templates; if you want ot make a new one up, hand edit it. <- pretty easy option (Assuming we're just swapping xmodmap's say)
Do you mean basically there will just be a folder where you can store configuration text files (like .conf files for DOSBox), each of which will be recognized as a keyboard config which you'll be able to choose in a menu? That sounds like a good quickfix - much better than nothing, certainly.

I'm guessing it'll look something like:

Code:
letter-a=a
letter-a-shift=A
letter-a-Fn='
letter-b=b
letter-b-shift=B
letter-b-Fn=|
Code:
l-nub-left=mouse
l-nub-up=mouse
l-nub-right=mouse
l-nub-down=mouse
r-nub-left=Home
r-nub-up=PgUp
r-nub-right=End
r-nub-down=PgDown
A=left-mouse-click
B=right-mouse-click
X=middle-mouse-click
Y-double-mouse-click

etc.

and it could be easily editable in a text editor.
 
Last edited by a moderator:
Another thought: if the functions of the right nub and 4 face buttons are switched, might it also be possible to assign the up/down directions on that right nub to the scroll wheel of the mouse, instead of pgUp/pgDown? It would serve the same purpose, anyway, and I've come across a few ported programs that use the scroll wheel.
 
Back
Top