Opened 11 years ago

Closed 4 years ago

Last modified 4 years ago

#1917 closed enhancement (fixed)

Resolve Delete hotkey issue on Mac keyboards

Reported by: historic_bruno Owned by: wraitii
Priority: Nice to Have Milestone: Alpha 24
Component: Core engine Keywords:
Cc: Patch:

Description

As discussed on the forum, the Delete key on Mac keyboards behaves like the Backspace key on PC keyboards, so wxWidgets and SDL treat it like a backspace. This is confusing for Mac users because they see the word "Delete" but it doesn't work for our Delete hotkeys, nor does it act like they expect (they have to press Fn+Delete instead, or a second, forward delete key if the keyboard has one).

Possible solutions:

  • combine Backspace+Delete, but then we lose Backspace as a possible hoykey (it's used for timewarp mode currently), maybe that's acceptable
  • special case some hotkeys for OS X, but what happens if a Mac user has a PC keyboard or vice versa - admittedly an uncommon scenario
  • implement hotkey sets, OS X users would start with a set specially chosen for Mac keyboards
  • change nothing and document that Mac users must press Fn+Delete to delete units?

Change History (2)

comment:1 by wraitii, 4 years ago

Owner: set to wraitii
Resolution: fixed
Status: newclosed

In 24215:

Let players remap hotkeys in-game, fix default hotkeys being qwerty-specific.

  • Provide a "Hotkey" screen to let players remap hotkeys in-game using a convenient setup.
  • Make all .cfg hotkeys refer to scancodes (i.e. position on the keyboard), so that default hotkeys now translate correctly for AZERTY, QWERTZ and other layouts.
  • 'BackSpace' is now an alias for 'Delete', and works for killing units. This fixes #1917, as macs don't have a proper delete key and would need to use Fn+Del otherwise. This shifts "timewarp" to Shift+BackSpace.

Functionally, this switches hotkeys to scancodes, as that makes more sense (they are combinations of key positions, not actual text output).
SDL includes are cleaned and key names are reused.

Fixes #2850, Fixes #2604, Refs #1810, Fixes #1917.

Follows work in rP19624.

Various diffs tested by: Angen, Stan, Freagarach

Comments by: Nescio

Differential Revision: https://code.wildfiregames.com/D2814

comment:2 by Stan, 4 years ago

Milestone: BacklogAlpha 24
Note: See TracTickets for help on using tickets.