diff --git a/src/game/g_gui.pas b/src/game/g_gui.pas
index 8a599fd7a3a9a0c99c05245216c0f1882937dec6..9b44f6f8a7b8a4e572c1e4b31216598c57b4ec6d 100644 (file)
--- a/src/game/g_gui.pas
+++ b/src/game/g_gui.pas
if Msg.Msg = WM_KEYDOWN then
begin
case Msg.wParam of
- IK_ESCAPE, VK_ESCAPE, JOY0_JUMP, JOY1_JUMP, JOY2_JUMP, JOY3_JUMP:
+ VK_ESCAPE:
begin
g_GUI_HideWindow;
Exit
case Msg of
WM_KEYDOWN:
case wParam of
- IK_ESCAPE, VK_ESCAPE, JOY0_JUMP, JOY1_JUMP, JOY2_JUMP, JOY3_JUMP:
+ VK_ESCAPE:
begin
if FIsQuery then actDefCtl();
FIsQuery := False;
FIsQuery := True;
end
- else
+ else if (wParam < VK_FIRSTKEY) and (wParam > VK_LASTKEY) then
begin
- FKey := IK_ENTER; // <Enter>
+ // FKey := IK_ENTER; // <Enter>
+ FKey := wParam;
FIsQuery := False;
actDefCtl();
end;
else if FIsQuery then
begin
case wParam of
- IK_ENTER, IK_KPRETURN, VK_FIRE, VK_OPEN, JOY0_ATTACK, JOY1_ATTACK, JOY2_ATTACK, JOY3_ATTACK: // Not <Enter
+ IK_ENTER, IK_KPRETURN, VK_FIRSTKEY..VK_LASTKEY, JOY0_ATTACK, JOY1_ATTACK, JOY2_ATTACK, JOY3_ATTACK: // Not <Enter
else
if e_KeyNames[wParam] <> '' then
FKey := wParam;
case Msg of
WM_KEYDOWN:
case wParam of
- IK_ESCAPE, VK_ESCAPE, JOY0_JUMP, JOY1_JUMP, JOY2_JUMP, JOY3_JUMP:
+ VK_ESCAPE:
begin
if FIsQuery then actDefCtl();
FIsQuery := False;
FIsQuery := True;
end
- else
+ else if (wParam < VK_FIRSTKEY) and (wParam > VK_LASTKEY) then
begin
- if (FKeyIdx = 0) then FKey0 := IK_ENTER else FKey1 := IK_ENTER; // <Enter>
+ // if (FKeyIdx = 0) then FKey0 := IK_ENTER else FKey1 := IK_ENTER; // <Enter>
+ if (FKeyIdx = 0) then FKey0 := wParam else FKey1 := wParam;
FIsQuery := False;
actDefCtl();
end;
else if FIsQuery then
begin
case wParam of
- IK_ENTER, IK_KPRETURN, VK_FIRE, VK_OPEN,
- JOY0_ATTACK, JOY1_ATTACK, JOY2_ATTACK, JOY3_ATTACK: // Not <Enter
+ IK_ENTER, IK_KPRETURN, VK_FIRSTKEY..VK_LASTKEY, JOY0_ATTACK, JOY1_ATTACK, JOY2_ATTACK, JOY3_ATTACK: // Not <Enter
else
if e_KeyNames[wParam] <> '' then
begin