forked from RobertBeckebans/TrenchBroomBFG
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2109: add patch to fix wxWidgets return key bug on macOS (TrenchBroom…
…#2113) * 2109: add patch to fix wxWidgets return key bug on macOS * 2109: fix patch extension
- Loading branch information
Showing
3 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
diff --git src/osx/textctrl_osx.cpp src/osx/textctrl_osx.cpp | ||
index 1ef8afa420..452d4272cf 100644 | ||
--- src/osx/textctrl_osx.cpp | ||
+++ src/osx/textctrl_osx.cpp | ||
@@ -342,6 +342,13 @@ void wxTextCtrl::OnDropFiles(wxDropFilesEvent& event) | ||
|
||
void wxTextCtrl::OnKeyDown(wxKeyEvent& event) | ||
{ | ||
+ int key = event.GetKeyCode(); | ||
+ if ( key == WXK_RETURN || key == WXK_NUMPAD_ENTER ) { | ||
+ // HACK: Forward these keys to the OnChar handler | ||
+ OnChar(event); | ||
+ return; | ||
+ } | ||
+ | ||
if ( event.GetModifiers() == wxMOD_CONTROL ) | ||
{ | ||
switch( event.GetKeyCode() ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters