From d25c39396c23a530da48856791af65bf5f8347e8 Mon Sep 17 00:00:00 2001 From: nickysn Date: Fri, 1 Dec 2017 17:07:52 +0000 Subject: [PATCH] + support the arrow keys and pgup/pgdn/home/end/ins/del keys in the win16 keyboard unit. fpctris is now playable on win16 :) git-svn-id: trunk@37644 - --- packages/rtl-console/src/win16/keyboard.pp | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/packages/rtl-console/src/win16/keyboard.pp b/packages/rtl-console/src/win16/keyboard.pp index 61a0248dd7..0dbd375917 100644 --- a/packages/rtl-console/src/win16/keyboard.pp +++ b/packages/rtl-console/src/win16/keyboard.pp @@ -85,6 +85,29 @@ begin if charcount>0 then for i:=0 to charcount-1 do KbdBufEnqueue((kbPhys shl 24) or charbuf[i] or (KbdShiftState shl 16)); + { TODO: implement all keys and shift/alt/ctrl combinations } + case wParam of + VK_LEFT: + KbdBufEnqueue((kbPhys shl 24) or $4B00 or (KbdShiftState shl 16)); + VK_UP: + KbdBufEnqueue((kbPhys shl 24) or $4800 or (KbdShiftState shl 16)); + VK_DOWN: + KbdBufEnqueue((kbPhys shl 24) or $5000 or (KbdShiftState shl 16)); + VK_RIGHT: + KbdBufEnqueue((kbPhys shl 24) or $4D00 or (KbdShiftState shl 16)); + VK_PRIOR: { Page Up } + KbdBufEnqueue((kbPhys shl 24) or $4900 or (KbdShiftState shl 16)); + VK_NEXT: { Page Down } + KbdBufEnqueue((kbPhys shl 24) or $5100 or (KbdShiftState shl 16)); + VK_HOME: + KbdBufEnqueue((kbPhys shl 24) or $4700 or (KbdShiftState shl 16)); + VK_END: + KbdBufEnqueue((kbPhys shl 24) or $4F00 or (KbdShiftState shl 16)); + VK_INSERT: + KbdBufEnqueue((kbPhys shl 24) or $5200 or (KbdShiftState shl 16)); + VK_DELETE: + KbdBufEnqueue((kbPhys shl 24) or $5300 or (KbdShiftState shl 16)); + end; end; WM_KEYUP, WM_SYSKEYUP: