Keyboard function priority list
|My point of view is that the current keybindings file is a mess, with many historical bindings, and also it binds in the ASCII space, as opposed to the scan code space, so we can't distinguish keypad vs normal number keys, and various other combinations, even though osgViewer supports that.
My *personal* feeling is that unless it's something the > 50% of users use *each flight*, it shouldn't be a keybinding. So flaps, trim, CDI/HSI heading, fine, but things to change view distance or FoV seem unnecessary to me.
The other issue is the keybindings are effectively 'full' (we can't easily add more), because they've been added and added over the years, but rarely removed, so at this point every key 'does something', but often something quite obscure.
What I'd like to see is the entire 'Ctrl' (Command on Mac) space reserved for GUI functions, like a normal application - Ctrl-Q for quit, Ctrl-M for map dialog, Ctrl-A for autopilot dialog, Ctrl-R for replay dialog (or radios dialog :) - then have a complete discussion about which key-bindings make sense onthe main keyboard. This is basically a usability discussion, so everyone will have strong opinions :)
— James Turner
|A separate step, much harder to make happen, would be to explicitly reserve the
Ctrl (Command on Mac) keybinding space for menu/non-aircraft keyboard
shortcuts. I would really like to do this so we can have user-friendly
key-bindings for dialogs and standard items, such as Ctrl-Q to quit, Ctrl-A for
autopilot dialog, Ctrl-P for pause, Ctrl-R for reply, etc. [And the entire
normal key / key + shift / key+alt ranges available FOR aircraft functions, of
course) The problem is right now we have aircraft using Ctrl- shortcuts for
many things (usually because they're the only choice), and I can't decide a
sane way to migrate to this split without lots of breakage and frustration. Any
|the problem is the OSs have already decreed that Ctrl (Command on Mac) is
the standard shortcut key, so lots of Ctrl-something have standard meanings
which FlightGear deviates from. Though we escape the worst of it since we don't
support file or edit operations.
Keep in mind if the GUI things such as dialogs were moved to Ctrl-blah, that
frees up lots of normal keys for use, which are currently taken up by simulator
things. While I agree Ctrl is probably the easiest modifier to access (except
maybe shift, since there's two, so it's more friendly for left-handed people),
I think by this logic a shortcut with *no* modifiers is even easier to access,
and that's an argument in *favour* of such change :)
|this actually shows a larger problem. Obviously it isn't too
uncommon for aircraft to disable or override specific menu items -
mainly affects menu items for the radio stack and autopilot.
Unfortunately all of this is done using fixed menu item positions -
e.g. 5th menu, 3rd item... So any change of the menu item ordering
currently breaks lots of planes. And obviously the recent menubar
overhaul has done just that.
We'll need to adapt all the aircraft using such hacks to the changed
menu structure. And might need to think about a better solution to
avoid future problems of this kind.
|IMO the menu reordering represents a significant usability improvement and is
something we want to encourage. Furthermore backing it out will also require
changes to the manual, so isn't quite as straightforward as it might seem at
I think the number of affected theses aircraft is sufficiently small that they
can be updated to fix this. Aircraft maintainers have always had to keep up
with changes in the core code (e.g. The ambient material change) and this is no
different except that it has only been noticed fairly late in the release
Aircraft outside of the shears repository are not restricted to our release
cycle and can be updated after the release as and when their maintainers notice
this issue. I suspect that a number are waiting for the release to test their
Adding symbolic names along with some helper functions for disabling them in
Nasal/gui.nas is pretty easy. I'm happy to take on writing the code etc.
Probably not today though!
|It turns out that Nasal/gui.nas already had a menuEnable function for
enabling or disabling entire menus or individual menu items using
unique names rather than the labels. Names already exist for the
autopilot menu and the Fuel & Payload dialog. So, the fix is for the
aircraft to make use of this e.g.
We can add new names for any other menus that we might want to disable
on a per-aircraft basis, but from a quick skim through the menus I
couldn't see any other candidates.
|Going through the aircraft highlighted a number of functions that
aren't covered by the existing enable/disable function in gui.nas
1) Replacing the autopilot dialog with another.
2) Adding pushback. Most aircraft add this to the Equipment menu
I'll need to think about how to handle these cases.
|The following aircraft override the radio dialog, which has moved since v2.0.0.
I've just pushed an enhancement to gui.nas that allows the aircraft developer to
change the binding for a symbolically named dialog, in the same way
that they can
enable/disable dialogs and menus using the existing gui.menuEnable() function.
So, you can now put the following code in your aircraft-specific Nasal files:
This replaces the binding for the "radio" menu item with a command to open the
dialogs.Radio dialog box (that you've defined elsewhere).
Note that this searches the menu for the symbolic names (name tag) defined in
menubar.xml, (e.g. radio, autopilot-settings, gps, map) rather than
the label tag,
which may change over time, so should be a robust long-term solution.
- James Turner (Sun, 03 Mar 2013). Keyboard bindings.
- (). .
- (). .
- (). .
- (). .
- (). .
- (). .
- (). .
As a first step in the keyboard refactoring, we need to come up with a prioritized list of functions that (a) are general enough to apply to most (or at least many) aircraft, and (b) are important enough to justify a keyboard shortcut rather than just a menu/dialog or a model hotspot.
Feel free to add to the list, but please don't delete anything — just move it to the bottom if you don't think it's important.
As we'll probably not want to change too many existing key-bindings, The current CVS key-binding is also listed in brackets.
- Show/Hide menu
- Primary flight controls
- ailerons / , /
- elevator / , /
- rudder / ,
- centre controls
- Primary powerplant
- throttle — for helicopters, should the same key control the collective? / , /
- Winch / Aerotow (begin winching, open hitch etc)
- View controls
- view reset +
- look left/right / + +
- look up/down
- look forward/backwad / + +
- zoom in/out / +
- change view type — e.g. cockpit, chase plane, tower, etc. / +
- Secondary flight controls
- flaps extend/retract /
- landing gear raise/retract / +
- elevator trim up/down / , /
- speed brakes extend/retract +
- spoilers extend/retract /
- slats extend/retract
- toggle tailwheel lock
- differential toe brakes left/right /
- parking brake +
- drag chute deploy/jettison
- aileron trim left/right
- rudder trim left/right
- Secondary powerplant
- mixture — piston aircraft only / +
- propeller — some piston aircraft only / +
- carburettor heat — some piston aircraft only
- magneto/ignition selection /
- Select engines / / / / (Note: These keys are problematic on some keyboard layouts, e.g. Swedish where IIRC '~', '@' and'$' are at inconvenient locations. Is there a way to capture number key + shift instead of whatever "strange" symbol the English keyboard layout maps to that key?)
- toggle heading mode +
- toggle altitude mode +
- toggle wing leveller +
- toggle speed mode (auto-throttle) +
- autotrim engage/disengage
- open/close text based chat console
- PTT switch
- active/standby com/nav channel swap
- fire primary weapon
- fire secondary weapon
- select secondary weapon
- jettison store
- hoist deploy (helicopters)
- hoist up/down
- hoist jettison
- water/cargo release
- carrier launch bar engage
- carrier catapult release
- hook up/down (compatible A/C all modern jet fighters have a hook)
- canopy toggle
- seat up/down/default
Things that don't require key bindings:
- throw turkey out of window (Les Nessman only)
- change viewing styles (dynamic view and g-force based view where supported)