In order to enable single key shortcuts for commands and functions in Flash 8-CS6, we have been 'hacking' the shortcut files for years…
But for the first time now, while preparing the shortcuts for our upcoming v.3 release, I dedicated enough time to gather all the needed empirical data and build an easy to use conversion table that describes all flags and scope values in the various CS incarnations for Win and Mac.
Working on that I came to the accidental discovery that a universal shortcut file is possible to compile for each of the operating systems which works with pre-CC versions supported by EDAP Tools (Flash 8, CS3, CS4, CS5, CS5.5 and CS6)
All the information below seems to be unique and undocumented prior to the moment of posting.
I will try to explain my findings so that other Flash users can modify their shortcut sets to better suit their needs.
Flags, scope and key values. Conversion tables for Win and Mac. Formatting.
Flash have changed their shortcut formats many times.
The Windows shortcut file has a *.wfx extension and resides in
C:\Documents and Settings\username\Local Settings\Application Data\Adobe\Flash CSx\en_US\Configuration\Keyboard Shortcuts
The Mac shortcut file has a *.mfx extension and is in
Macintosh HD/Users/username/Library/Application Support/Adobe/Flash CSx/language/Configuration/Keyboard Shortcuts
These files are xml-s and can be modified in a plain text editor (such as Notepad, EditPad Lite, Notepad2, Notepad++).
A typical entry for the earlier versions looks like this:
<Shortcut id="50851" key="67" scope="1647" flags="3" />
shortcut id would be a menu function
key is the key code as described in this document ( Flash KeyCodes PDF ).
scope is the workspace area in Flash, i.e. Tools, Drawing Menu, Edit Script, etc.
flags defines the modifier keys (a value of 3 on Win means a single key without modifiers; 67 is C)
Win and Mac flags values are different due to different keyboard layouts.
Flash 8 and CS3 for Win and Mac use numeric scope values, but these differ between Win and Mac.
CS4 for Win uses the Mac scope values, i.e. they started to unify them.
In CS5, CS5.5 and CS6 scope values have been changed to descriptive and are the same for Win and Mac.
In CC Adobe introduced a more open xml shortcut format and allowed single keys to be assigned via the panel. I will not discuss CC shortcuts in this article at all.
Here is a table which describes the various Scope values:
|Win/Mac CS5+||Win 8-CS4||Mac 8-CS4||Means (in Edit Keyboard Shortcuts dialog)|
|IDR_ACTION_LIST||1533 (1116 in CS4)||1116||Actions Panel commands|
|IDR_ASDOCTYPE||1533||8||Script Edit Commands|
|IDR_DEBUGDOCTYPE||9 (21 in CS4)||21||Debug Movie Commands|
|IDR_KB_ACCESSIBILITY||1603 (1184 in CS4)||1184||Workspace Accessibility Commands|
|IDR_MAINFRAME||1||1||Drawing Menu Commands|
|IDR_SKETCHTYPE||2||2||Drawing Menu Commands|
|IDR_SWFDOCTYPE||6 (5 in CS4)||5||Test Movie Menu Commands|
|IDR_TOOLKEYS||1647 (1228 in CS4)||1228||Tools Panel|
And below is a table describing the Flags values:
|Modifier(s)||Win (flags="x")||Mac (flags="x")|
|key only (no modifier)||0, 1, 2, 3||1|
|control+ / command+||8, 9, 10, 11||17|
|shift+||4, 5, 6, 7||5|
|alt+||16, 17, 18, 19||9|
|control+shift+ / command+shift||12, 13, 14, 15||21|
|alt+shift+||20, 21, 22, 23||13|
|control+alt+ / command+alt+||24, 25, 26, 27||25|
|control+alt+shift+ / command+alt+shift+||28, 29, 30, 31||29|
Default Win values: 3, 7, 11, 15, 19, 23, 27, 31 (but all four are valid)
Default Mac values: 1, 5, 9, 13, 17, 21, 25, 29
Universal Shortcuts File for F8-CS6
The best way to create a universal shortcut file that would work in Flash 8 and all CS versions is to do it for CS6 Win and then in a copy of this file use Find and Replace in a plain text editor to convert the scope values from descriptive to numeric in the F8-CS3 format; then duplicate the ones that have different values for CS4 and finally merge the two files.
The resulting xml will have 2 and sometimes 3 entries per item. Flash does not seem to mind being fed such a file. Different versions only read what they can understand.
Best practice is to rearrange the shortcuts according to the key code value. In this way conflicts can be easily spotted and resolved.
Below is an example of such a set for a single key (flags=”3”) shortcut C (code 67) to toggle object drawing:
- first line shows F8-CS3 entry
- second line CS4 entry
- third line CS5-CS6 entry
<?xml version="1.0" encoding="UTF-8"?> <KeyboardShortcuts version="1.0"> <Shortcut id="50851" key="67" scope="1647" flags="3" /> <Shortcut id="50851" key="67" scope="1228" flags="3" /> <Shortcut id="50851" key="67" scope="IDR_TOOLKEYS" flags="3" /> </KeyboardShortcuts>
Key code values are described here: http://help.adobe.com/…
or you can download a printable Flash KeyCodes PDF PDF from our site.
Ideally once created and cleaned up manually, the shortcuts files should never be processed through Flash's panel as in various versions it tends to break things in all kinds of ways. A read-only file attribute may prevent Flash from modifying the set.
On Windows Alt+ C, D, E, F, H, I, M, O, T, V, W open menus and these combinations cannot be used for shortcuts.
Single key shortcuts that are used to access tools cannot be used in a Shift+ combination for other functions. For example v is used for the black arrow tool. Shift+V will do just the same as Flash does not make difference between lower and upper case letters. V is the same as v.
Creating your own customized set
A good way to start would be a blank shortcuts file.
You can duplicate Adobe's default in explorer and delete all the content except for these lines
<?xml version="1.0" encoding="UTF-8"?> <KeyboardShortcuts version="1.0"> </KeyboardShortcuts>
Then load this as your current set through Flash menu and assign Ctrl+Shift+ shortcuts to the functions you want to use.
Close Flash a open your *.wfx file in a plain text editor.
In Windows you will get 12 or 15 as your flags value.
Change that number to 3 (Win) or 1 (Mac) and you will get single key shortcuts.
Save your file and start Flash to see the results.