Add WXK_CONTROL_A..WXK_CONTROL_Z constants.

These key codes provide nicer symbolic values for ASCII values in 1..26 range
generated by Ctrl+Letter keys.

Closes #13075.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2011-03-23 12:59:59 +00:00
parent 6c1de05621
commit 09bdb1cb3e
3 changed files with 30 additions and 0 deletions

View File

@ -495,6 +495,7 @@ All (GUI):
- Added support for reading image resolutions from PNG images (scottb).
- wxComboCtrl, wxOwnerDrawnComboBox: better support for themed and custom
panel backgrounds, especially on OS X.
- Add WXK_CONTROL_A..WXK_CONTROL_Z constants (Jan van Dijk).
GTK:

View File

@ -2354,6 +2354,33 @@ enum wxKeyCode
{
WXK_NONE = 0,
WXK_CONTROL_A = 1,
WXK_CONTROL_B,
WXK_CONTROL_C,
WXK_CONTROL_D,
WXK_CONTROL_E,
WXK_CONTROL_F,
WXK_CONTROL_G,
WXK_CONTROL_H,
WXK_CONTROL_I,
WXK_CONTROL_J,
WXK_CONTROL_K,
WXK_CONTROL_L,
WXK_CONTROL_M,
WXK_CONTROL_N,
WXK_CONTROL_O,
WXK_CONTROL_P,
WXK_CONTROL_Q,
WXK_CONTROL_R,
WXK_CONTROL_S,
WXK_CONTROL_T,
WXK_CONTROL_U,
WXK_CONTROL_V,
WXK_CONTROL_W,
WXK_CONTROL_X,
WXK_CONTROL_Y,
WXK_CONTROL_Z,
WXK_BACK = 8, // backspace
WXK_TAB = 9,
WXK_RETURN = 13,

View File

@ -1252,6 +1252,8 @@ enum wxKeyCategoryFlags
Notice that currently no translation is done for the presses of @c [, @c
\\, @c ], @c ^ and @c _ keys which might be mapped to ASCII values from 27
to 31.
Since version 2.9.2, the enum values @c WXK_CONTROL_A - @c WXK_CONTROL_Z
can be used instead of the non-descriptive constant values 1-26.
Finally, modifier keys only generate key events but no char events at all.
The modifiers keys are @c WXK_SHIFT, @c WXK_CONTROL, @c WXK_ALT and various