diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-07-23 15:05:49 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-07-23 15:05:49 +0000 |
commit | 33c1099799c6d489e849742b5d9fb7f7f6a06c3c (patch) | |
tree | d47dcac3feff16e30bdb5d8c2a633301943cf94c /unicode | |
parent | 07a95117601badd3747f812ca3952a391ff5c0b0 (diff) | |
download | usdx-33c1099799c6d489e849742b5d9fb7f7f6a06c3c.tar.gz usdx-33c1099799c6d489e849742b5d9fb7f7f6a06c3c.tar.xz usdx-33c1099799c6d489e849742b5d9fb7f7f6a06c3c.zip |
CTRL+[A-Z] experiment
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1864 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'unicode')
-rw-r--r-- | unicode/src/base/UMain.pas | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/unicode/src/base/UMain.pas b/unicode/src/base/UMain.pas index 1962e953..0c3410d1 100644 --- a/unicode/src/base/UMain.pas +++ b/unicode/src/base/UMain.pas @@ -468,6 +468,16 @@ begin end; SDL_KEYDOWN: begin + // translate CTRL-A (ASCII 1) - CTRL-Z (ASCII 26) to correct charcodes. + // keysyms (SDLK_A, ...) could be used instead but they ignore the + // current key mapping (if 'a' is pressed on a French keyboard the + // .unicode field will be 'a' and .sym SDLK_Q). + // IMPORTANT: if CTRL is pressed with a key different than 'A'-'Z' SDL + // will set .unicode to 0. There is no possibility to obtain a + // translated charcode. Use keysyms instead. + //if (Event.key.keysym.unicode in [1 .. 26]) then + // Event.key.keysym.unicode := Ord('A') + Event.key.keysym.unicode - 1; + // remap the "keypad enter" key to the "standard enter" key if (Event.key.keysym.sym = SDLK_KP_ENTER) then Event.key.keysym.sym := SDLK_RETURN; |