In a discussion about a desirable keyboard reorganization, John D. suggested vi-like keyboard commands that consist of more than one stroke:
http://www.mail-archive.com/flightgear-devel%40lists.sourceforge.net/msg13356.html I've now committed a first version of a Nasal-based solution. Tat greatly extended my example config file in $FG_ROOT/Input/Keyboard/multikey.xml As you can see, it looks very much like keyboard.xml, except that <key>s are nested. The indices (n="123") aren't actually used. They are only there so that users can safely redefine entries. Like in vi you start with the colon ':'. The next key selects a group, etc. See John's keys.txt file to learn more about the concept, though the current version has some differences and is not complete. Examples: :rc1f123.456 ||||____________________frequency |||_________________1 ||_____________comm |_________radio :aht200 |||_________________true ||_____________heading |_________autopilot Most commands are executed by pressing the return key. Some work without that (:4 ... to run the code in the nasal-console dialog's tab 4). :v<cursor-keys> shows how to configure non-closing commands. The current combinations aren't final. Tat and I worked on the current set, but we'd like people to test this and to submit suggestions (and patches! :-) for how to organize it. Tat's latest config follows these rules (partly inspired by John's original file): [Command Naming Convention] There's not clear command naming convention at this moment. My own rules are: 1) Use instinctive letters (e.g. f for flight, e for engines) 2) Use small letters for frequently used commands (e.g. e for engines, r for Radio) 3) use capital letters for less frequently used commands (like E for Environment) 4) Initials of Dialog UI Control Group Hierarchy (ah for Autopilot > Heading) 5) Initials of Property Hierarchy (fa for flight/aileron) 6) Alternative letter in case there are more than one candidate× (apa for Autopilot > Pitch/Altitude > Altitude, and apo for Autopilot > Pitch/Altitude > AoA) Here's a set of currently offered combinations: # AutoPilot: ## Velocity Control avt<value> Enables "speed hold with throttle" at <value> knots avp<value> Enables "speed hold with pitch trim" at <value> knots av/ Disables speed hold ## Heading Control ahb<value> Enables "heading bug hold" aiming to <value> degree aht<value> Enables "True heading hold" aiming to <value> degree ahw Enables "Wing level hold" ahn Enables "Nav1 hold" ah/ Disables Heading control ## Pitch / Altitude Control apv<value> Sets vertical speed to <value> fpm app<value> Holds Pitch at <value> degree apo<value> Holds AoA at <value> degree apa<value> Holds Altitude at <value> feet apg<value> Holds AGL at <value> feet apn Holds Nav1 glide-slope ap/ Disable Pitch / Altitude control # Engine Controls (for all engines) <!-- Below should be adjustments instead of setting absolute values... --> em<value> Sets mixture to <value> (0.0 to 1.0) ep<value> Sets propeller-pitch to <value> (0.0 to 1.0) et<value> Sets throttle to <value> (0.0 to 1.0) Note: :e2m<value> should specifically work on engine 2. # Environment ## Time Settings Etc Sets time to real clock time Etn Sets time to noon ## Weather Scenario Ewsf Sets weather scenario to "Fair weather" Ewsm Sets weather scenario to "METAR" (real weather fetch) Ewsn Sets weather scenario to "none" Ewst Sets weather scenario to "Thunderstorm" # Flight Controls fa<value> Adjusts aileron by <value> (-2.0 to +2.0) fat<value> Adjusts aileron trim by <value> (-2.0 to +2.0) fat<left/right> Adjusts aileron trim continuously fe<value> Adjusts elevator by <value> (-2.0 to +2.0) fet<value> Adjusts elevator trim to <value> (-2.0 to +2.0); positive value nakes nose down) fet<up/down> Adjusts elevator trim continuously ; up arrow makes nose down fr<value> Adjusts rudder to <value> (-2.0 to +2.0) frt<left/right> Adjusts rudder trim continuously fia Initializes all trims (FIXME: more proper name...) # View direction v<left/right/up/down> Changes view direction # Radio Settings raf<value> Sets ADF frequency to <value> rc<1/2>f<value> Sets Comm<0/1> frequency to <value> rc<1/2>t Toggles Comm<0/1> selected / standby rn<1/2>f<value> Sets Nav<1/2> frequency to <value> rn<1/2>t Toggles Nav<0/1> selected / standby # Nasal Console (Just an example of quick command without typing return) <digit> If you wonder why "Sets weather scenario" is even there -- it's something for which the dialog should be good enough --, this is for our blind users, who have a problem with dialogs. m. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Flightgear-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/flightgear-devel

