# The app's own shortcuts must never reach the game (runtime/keyboard_mac.m:
# a key pressed with Command goes to the menu): Cmd-N (frame-rate counter,
# fpscounter.m) and Cmd-T (texture pack toggle, texrep.m), while typing a
# profile name and while racing.  Also Shift + Command + T in both orders:
# a Shift pressed before Command reaches the game like any Shift press (the
# reason no app shortcut uses Shift, Control or Option: they are the game's
# gear and nitrous keys), the T never does.  Run with NFSU2_KEY_LOG=1 (every
# message the game gets is logged as "[key]   -> ..."), NFSU2_FPS_COUNTER_LOG=1
# and a texture pack in use (NFSU2_TEXTURES=upscaled, NFSU2_TEXPACK=<pack>)
# so the toggle's menu item exists.  The name field keeps letters and digits
# (7 at most): "Ab", the shortcuts, "cd" must give "Abcd" with no N or T in
# it.  ${TEXKEY} = the toggle's key (T).
0     nstapuntil RETURN MC_Background.fng 120 4000  # title -> "create a new profile?"
+120  nstap LEFT                                    # "Yes"
+30   nstap RETURN
+240  nstap BACK                                    # clear "NAME"
+8    nstap BACK
+8    nstap BACK
+8    nstap BACK
+20   nstype Ab
+40   log shortcut: Cmd-N in the name field
+0    nstap cmd+N
+40   log shortcut: Cmd-${TEXKEY} in the name field
+0    nstap cmd+${TEXKEY}
+40   log shortcut: Shift down, then Cmd, then ${TEXKEY}, in the name field
+0    nsdown LSHIFT
+6    nsdown LCMD
+6    nstap ${TEXKEY}
+10   nsup LCMD
+6    nsup LSHIFT
+40   log shortcut: Cmd down, then Shift, then ${TEXKEY}, in the name field
+0    nsdown LCMD
+6    nsdown LSHIFT
+6    nstap ${TEXKEY}
+10   nsup LSHIFT
+6    nsup LCMD
+40   nstype cd
+80   dump name_after_shortcuts
+0    log shortcuts done in the name field
+0    nstap RETURN                                  # "save profile named ...?" ("No" selected)
+240  nstap LEFT                                    # "Yes"
+30   nstap RETURN
+0    nstapuntil RETURN GarageMain.fng 150 3000     # "Save complete." -> main menu
+400  log main menu
+0    nstapuntil RETURN UI_QRModeSelect.fng 150 3000   # Quick Race (the first item)
+300  nstap RETURN                                  # Circuit
+300  nstap RETURN                                  # Resort Loop
+300  nstap RETURN                                  # options
+300  nstap RETURN                                  # car
+300  nstap RETURN
+0    nstapuntil RETURN PC_Loading.fng 150 3000
+0    waitmem 0x8654a4 6 6000
+900  log shortcut: in the race, accelerating
+0    nsdown UP
+120  log shortcut: Cmd-N in the race
+0    nstap cmd+N
+60   log shortcut: Cmd-${TEXKEY} in the race
+0    nstap cmd+${TEXKEY}
+60   log shortcut: Shift down, then Cmd, then ${TEXKEY}, in the race
+0    nsdown LSHIFT
+6    nsdown LCMD
+6    nstap ${TEXKEY}
+10   nsup LCMD
+6    nsup LSHIFT
+60   log shortcut: Cmd down, then Shift, then ${TEXKEY}, in the race
+0    nsdown LCMD
+6    nsdown LSHIFT
+6    nstap ${TEXKEY}
+10   nsup LSHIFT
+6    nsup LCMD
+60   log shortcuts done in the race
+60   dump race_after_shortcuts
+0    nsup UP
+60   quit
