Make Ctrl+'A' to Ctrl+'Z' working again (Issue specific to Windows and Linux)
Fixes: lp:1804326 https://bugs.launchpad.net/kicad/+bug/1804326
This commit is contained in:
parent
ed6c68a1e3
commit
37f062d325
|
@ -397,7 +397,16 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
|
||||||
// char events for ASCII letters in this case carry codes corresponding to the ASCII
|
// char events for ASCII letters in this case carry codes corresponding to the ASCII
|
||||||
// value of Ctrl-Latter, i.e. 1 for Ctrl-A, 2 for Ctrl-B and so on until 26 for Ctrl-Z.
|
// value of Ctrl-Latter, i.e. 1 for Ctrl-A, 2 for Ctrl-B and so on until 26 for Ctrl-Z.
|
||||||
// They are remapped here to be more easy to handle in code
|
// They are remapped here to be more easy to handle in code
|
||||||
|
// Note also on OSX wxWidgets has a differnt behavior and the mapping is made
|
||||||
|
// only for ctrl+'A' to ctlr+'Z' (unicode code return 'A' to 'Z').
|
||||||
|
// Others OS return WXK_CONTROL_A to WXK_CONTROL_Z, and Ctrl+'M' returns the same code as
|
||||||
|
// the return key, so the remapping does not use the unicode key value.
|
||||||
|
#ifdef __APPLE__
|
||||||
if( unicode >= 'A' && unicode <= 'Z' && key >= WXK_CONTROL_A && key <= WXK_CONTROL_Z )
|
if( unicode >= 'A' && unicode <= 'Z' && key >= WXK_CONTROL_A && key <= WXK_CONTROL_Z )
|
||||||
|
#else
|
||||||
|
(void) unicode; //not used: avoid compil warning
|
||||||
|
if( key >= WXK_CONTROL_A && key <= WXK_CONTROL_Z )
|
||||||
|
#endif
|
||||||
key += 'A' - 1;
|
key += 'A' - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue