diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-01-28 21:02:57 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-01-28 21:05:12 -0500 |
commit | d8a01eb93e866c919b43f9f7f5247108b6f90caf (patch) | |
tree | 2898904aab384b1998b2e5c95631539e64bfdf4f /tools/fmt-bindings | |
parent | dab3346623245e8314452d6bd2688bc4eb51b1b9 (diff) |
fix up and comment fmt-bindings tool
Diffstat (limited to 'tools/fmt-bindings')
-rwxr-xr-x | tools/fmt-bindings | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/tools/fmt-bindings b/tools/fmt-bindings index 1ded5b33ec..aa76afe72f 100755 --- a/tools/fmt-bindings +++ b/tools/fmt-bindings @@ -31,20 +31,36 @@ GetOptions ("platform=s" => \$platform, "merge=s" => \$merge_from, "html" => \$html); +# +# The use of a separate @WINDOW@ meta-modifier was a mistake and needs to be removed from the bindings.in file. +# There is no separate key/modifier we can use for this, so inevitably it will be the same modifier as one of +# the other meta-modifiers. This means, for example, that @WINDOW@-b could be same as @SECONDARY@-b with no +# warnings given. One of the bindings will work, one won't. +# + if ($platform eq "darwin") { - $gtk_modifier_map{'PRIMARY'} = 'Primary'; + $gtk_modifier_map{'PRIMARY'} = 'Primary'; # GTK supports Primary to allow platform-independent binding to the "primary" modifier, which on OS X is Command $gtk_modifier_map{'SECONDARY'} = 'Control'; $gtk_modifier_map{'TERTIARY'} = 'Shift'; - $gtk_modifier_map{'LEVEL4'} = 'Mod1'; - $gtk_modifier_map{'WINDOW'} = 'Alt'; + $gtk_modifier_map{'LEVEL4'} = 'Mod1'; + $gtk_modifier_map{'WINDOW'} = 'Control'; + + # cs_modifier_map == "Cheat Sheet Modifier Map" + # Used to control what gets shown in the + # cheat sheet for a given (meta)-modifier $cs_modifier_map{'PRIMARY'} = 'Cmd'; $cs_modifier_map{'SECONDARY'} = 'Control'; $cs_modifier_map{'TERTIARY'} = 'Shift'; - $cs_modifier_map{'LEVEL4'} = 'Mod1'; - $cs_modifier_map{'WINDOW'} = 'Alt'; + $cs_modifier_map{'LEVEL4'} = 'Opt'; + $cs_modifier_map{'WINDOW'} = 'Control'; + # used to display what gets shown in the + # cheat sheet for mouse bindings. Differs + # from cs_modifier map in using shorter + # abbreviations. + $mouse_modifier_map{'PRIMARY'} = 'Cmd'; $mouse_modifier_map{'SECONDARY'} = 'Ctrl'; $mouse_modifier_map{'TERTIARY'} = 'Shift'; @@ -56,23 +72,29 @@ if ($platform eq "darwin") { $gtk_modifier_map{'PRIMARY'} = 'Control'; $gtk_modifier_map{'SECONDARY'} = 'Alt'; $gtk_modifier_map{'TERTIARY'} = 'Shift'; - $gtk_modifier_map{'LEVEL4'} = 'Meta'; + $gtk_modifier_map{'LEVEL4'} = $winkey; # something like "Mod4><Super" $gtk_modifier_map{'WINDOW'} = 'Alt'; - $gtk_modifier_map{$winkey} => 'Meta'; + + # cs_modifier_map == "Cheat Sheet Modifier Map" + # Used to control what gets shown in the + # cheat sheet for a given (meta)-modifier $cs_modifier_map{'PRIMARY'} = 'Control'; $cs_modifier_map{'SECONDARY'} = 'Alt'; $cs_modifier_map{'TERTIARY'} = 'Shift'; - $cs_modifier_map{'LEVEL4'} = 'Meta'; + $cs_modifier_map{'LEVEL4'} = 'Win'; $cs_modifier_map{'WINDOW'} = 'Alt'; - $cs_modifier_map{$winkey} => 'Meta'; + + # used to display what gets shown in the + # cheat sheet for mouse bindings. Differs + # from cs_modifier map in using shorter + # abbreviations. $mouse_modifier_map{'PRIMARY'} = 'Ctl'; $mouse_modifier_map{'SECONDARY'} = 'Alt'; $mouse_modifier_map{'TERTIARY'} = 'Shift'; - $mouse_modifier_map{'LEVEL4'} = 'Meta'; + $mouse_modifier_map{'LEVEL4'} = 'Win'; $mouse_modifier_map{'WINDOW'} = 'Alt'; - $mouse_modifier_map{$winkey} => 'Meta'; } %keycodes = (); |