From dbeaec3a0e5a50c84b70b28ae00a368a3e6e98e9 Mon Sep 17 00:00:00 2001 From: tobigun Date: Sat, 22 Mar 2008 11:58:28 +0000 Subject: Support for non-US (QWERTY) keyboard layout. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@970 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenEdit.pas | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'Game/Code/Screens/UScreenEdit.pas') diff --git a/Game/Code/Screens/UScreenEdit.pas b/Game/Code/Screens/UScreenEdit.pas index 407a37d0..4d105e5f 100644 --- a/Game/Code/Screens/UScreenEdit.pas +++ b/Game/Code/Screens/UScreenEdit.pas @@ -22,19 +22,24 @@ type implementation -uses UGraphic, UMusic, USkins; +uses UGraphic, UMusic, USkins, SysUtils; function TScreenEdit.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean; begin Result := true; If (PressedDown) Then begin // Key Down - case PressedKey of - SDLK_Q: + // check normal keys + case WideUpperCase(CharCode)[1] of + 'Q': begin Result := false; + Exit; end; - + end; + + // check special keys + case PressedKey of SDLK_ESCAPE, SDLK_BACKSPACE : begin -- cgit v1.2.3