Understanding Flash 8‑CS6 shortcut file

In order to enable sin­gle key short­cuts for com­mands and func­tions in Flash 8‑CS6, we have been ‘hack­ing’ the short­cut files for years…

But for the first time now, while prepar­ing the short­cuts for our upcom­ing v.3 release, I ded­i­cat­ed enough time to gath­er all the need­ed empir­i­cal data and build an easy to use con­ver­sion table that describes all flags and scope val­ues in the var­i­ous CS incar­na­tions for Win and Mac.

Work­ing on that I came to the acci­den­tal dis­cov­ery that a uni­ver­sal short­cut file is pos­si­ble to com­pile for each of the oper­at­ing sys­tems which works with pre-CC ver­sions sup­port­ed by EDAP Tools (Flash 8, CS3, CS4, CS5, CS5.5 and CS6)

All the infor­ma­tion below seems to be unique and undoc­u­ment­ed pri­or to the moment of posting.
I will try to explain my find­ings so that oth­er Flash users can mod­i­fy their short­cut sets to bet­ter suit their needs.

Flags, scope and key values. Conversion tables for Win and Mac. Formatting.

Flash have changed their short­cut for­mats many times.

The Win­dows short­cut file has a *.wfx exten­sion and resides in
C:\Documents and Settings\username\Local Settings\Application Data\Adobe\Flash CSx\en_US\Configuration\Keyboard Shortcuts

The Mac short­cut file has a *.mfx exten­sion and is in
Mac­in­tosh HD/Users/username/Library/Application Support/Adobe/Flash CSx/language/Configuration/Keyboard Shortcuts

These files are xml-s and can be mod­i­fied in a plain text edi­tor (such as Notepad, Edit­Pad Lite, Notepad2, Notepad++).

A typ­i­cal entry for the ear­li­er ver­sions looks like this:

<Shortcut id="50851" key="67" scope="1647" flags="3" />

short­cut id would be a menu function
key is the key code as described in this document ( Flash Key­Codes PDF ).
scope is the work­space area in Flash, i.e. Tools, Draw­ing Menu, Edit Script, etc.
flags defines the mod­i­fi­er keys (a val­ue of 3 on Win means a sin­gle key with­out mod­i­fiers; 67 is C)

Flags
Win and Mac flags val­ues are dif­fer­ent due to dif­fer­ent key­board layouts. 

Scope
Flash 8 and CS3 for Win and Mac use numer­ic scope val­ues, but these dif­fer between Win and Mac.
CS4 for Win uses the Mac scope val­ues, i.e. they start­ed to uni­fy them.
In CS5, CS5.5 and CS6 scope val­ues have been changed to descrip­tive and are the same for Win and Mac. 

In CC Adobe intro­duced a more open xml short­cut for­mat and allowed sin­gle keys to be assigned via the pan­el. I will not dis­cuss CC short­cuts in this arti­cle at all.

Here is a table which describes the various Scope values:
Win/Mac CS5+ Win 8‑CS4 Mac 8‑CS4 Means (in Edit Key­board Short­cuts dialog)
IDR_ACTION_LIST 1533 (1116 in CS4) 1116 Actions Pan­el 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 Work­space Acces­si­bil­i­ty Commands
IDR_MAINFRAME 1 1 Draw­ing Menu Commands
IDR_SKETCHTYPE 2 2 Draw­ing Menu Commands
IDR_SWFDOCTYPE 6 (5 in CS4) 5 Test Movie Menu Commands
IDR_TOOLKEYS 1647 (1228 in CS4) 1228 Tools Pan­el
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
con­trol+ / 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 val­ues: 3, 7, 11, 15, 19, 23, 27, 31 (but all four are valid)
Default Mac val­ues: 1, 5, 9, 13, 17, 21, 25, 29

Universal Shortcuts File for F8-CS6

The best way to cre­ate a uni­ver­sal short­cut file that would work in Flash 8 and all CS ver­sions is to do it for CS6 Win and then in a copy of this file use Find and Replace in a plain text edi­tor to con­vert the scope val­ues from descrip­tive to numer­ic in the F8-CS3 for­mat; then dupli­cate the ones that have dif­fer­ent val­ues for CS4 and final­ly merge the two files.
The result­ing xml will have 2 and some­times 3 entries per item. Flash does not seem to mind being fed such a file. Dif­fer­ent ver­sions only read what they can understand.

Best prac­tice is to rearrange the short­cuts accord­ing to the key code val­ue. In this way con­flicts can be eas­i­ly spot­ted and resolved.

Below is an exam­ple of such a set for a sin­gle key (flags=”3”) short­cut C (code 67) to tog­gle object drawing:

  • first line shows F8-CS3 entry
  • sec­ond 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 val­ues are described here: http://help.adobe.com/…
or you can down­load a printable  Flash Key­Codes PDF PDF from our site.
Ide­al­ly once cre­at­ed and cleaned up man­u­al­ly, the short­cuts files should nev­er be processed through Flash’s pan­el as in var­i­ous ver­sions it tends to break things in all kinds of ways. A read-only file attribute may pre­vent Flash from mod­i­fy­ing the set.

Lim­i­ta­tions
On Win­dows Alt+ C, D, E, F, H, I, M, O, T, V, W open menus and these com­bi­na­tions can­not be used for shortcuts.

Sin­gle key short­cuts that are used to access tools can­not be used in a Shift+ com­bi­na­tion for oth­er func­tions. For exam­ple v is used for the black arrow tool. Shift+V will do just the same as Flash does not make dif­fer­ence between low­er and upper case let­ters. V is the same as v.

Cre­at­ing your own cus­tomized set
A good way to start would be a blank short­cuts file.
You can dupli­cate Adobe’s default in explor­er and delete all the con­tent except for these lines

<?xml version="1.0" encoding="UTF-8"?>
<KeyboardShortcuts version="1.0">
</KeyboardShortcuts>

Then load this as your cur­rent set through Flash menu and assign Ctrl+Shift+ short­cuts to the func­tions you want to use.
Close Flash a open your *.wfx file in a plain text editor.
In Win­dows you will get 12 or 15 as your flags value.
Change that num­ber to 3 (Win) or 1 (Mac) and you will get sin­gle key shortcuts.
Save your file and start Flash to see the results.

 
Comments

No comments yet.

Leave a Reply