We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
0122 keyboard mappings (Read 800 times)
0122 keyboard mappings
Nov 29th, 2006, 10:23pm
 
I think this is part bug and part feature request, re the new keyboard mappings in 0122.  OS is Win XP Pro.

The bug part would be that ctrl-home/ctrl-end go to beg/end of word instead of beg/end of line (as i think was intended).  There don't appear to be any beg/end line shortcuts any more.

The feature request part would be to make keyboard mappings configurable, via preferences.txt perhaps?  Big pain or little pain to do something like that?

Thx
Re: 0122 keyboard mappings
Reply #1 - Nov 30th, 2006, 11:17pm
 
from revisions.txt: "while ctrl-left and right (cmd-left and right on mac) moves to the beginning or the end of a line." so it's at least covered for now.

i goofed the windows home/end thing, but am fixing it for 0123. i've been tainted by too many inconsistent apps between platforms.

as for putting it all in preferences.txt, it's not a big pain, but it is tedious. if you were motivated to contribute such a thing, you could provide a modified version of this file:

processing/app/syntax/PdeTextAreaDefaults.java

where instead of a line like:

inputHandler.addKeyBinding("HOME", InputHandler.DOCUMENT_HOME);

it would instead read:

String[] bindings = PApplet.aplit(Preferences.get("editor.keys.document_home"), ',');

for (int i = 0; i < bindings.length; i++) {
 inputHandler.addKeyBinding(bindings[i], InputHandler.DOCUMENT_HOME);
}

and in the prefs file you'd have

editor.keys.document_home = C+HOME

and if it were specific to windows or macosx, you'd use:

editor.keys.document_home.windows = C+HOME
editor.keys.document_home.macosx = HOME

sooo... just one of those things that would take an hour or two to get it right and tested properly. the tricky part is that multiple events take multiple key bindings, so they'd all be comma delimited.. and getting everything right between each of the platforms. which, i've already proven, isn't easy Wink
Re: 0122 keyboard mappings
Reply #2 - Dec 1st, 2006, 8:59pm
 
fry wrote on Nov 30th, 2006, 11:17pm:
so it's at least covered for now.


Good enough, and thanks.

Maybe in the future I'll consider such a contribution, certainly seems straightforward enough.  (though I'd be tempted to use .split instead of .aplit Cheesy)  Would "feel good" to make a useful contribution to help pay back my freeloading so far.

Right now though I don't even have the right build environment, so getting set up to (easily) compile the whole kit & kaboodle to test the contribution would probably be more work than writing the contribution itself.  So it'll have to wait until something more pressing has forced me to recompile.  (or until a day I'm just bored and looking for something to tinker with!)
Page Index Toggle Pages: 1