wxRichTextCtrl: Enhance macOS key bindings

Update key bindings for macOS to more closely match native behavior.

Currently, Cmd+Left goes to the left word boundary, and Cmd+Right goes
to the right word boundary, like on Windows (wxWidgets treats Cmd on Mac
as if it were Ctrl for keyboard modifier key purposes).  Alt/Opt+Left
and Alt/Opt+Right do nothing.

This change maps Cmd+Left to the start of the line, and Cmd+Right to the
end of the line.  It also maps Alt/Opt+Left to WordLeft() and
Alt/Opt+Right to WordRight(), which is conventional on native Cocoa
controls (including other wxWidgets controls that map directly to Cocoa
controls).

See #26064, #26066.

(cherry picked from commit 2048a6871c)
This commit is contained in:
Lee Ockert
2026-01-03 15:09:20 +01:00
committed by Vadim Zeitlin
parent 0d2c29beb3
commit 833ac77842
2 changed files with 23 additions and 2 deletions
+1
View File
@@ -259,6 +259,7 @@ wxMSW:
wxOSX:
- Fix wxChoice default size under macOS 26 Tahoe (#26058).
- Improve wxRichTextCtrl handling of cursor keys (Lee Ockert, #26064).
3.2.9: (released 2025-12-12)