Skip to content

Commit f57e4f2

Browse files
committed
FIX: swapped location of the virtual key conversion table (host-event.c is not used in Base builds)
1 parent cd88157 commit f57e4f2

File tree

2 files changed

+35
-35
lines changed

2 files changed

+35
-35
lines changed

src/os/win32/dev-stdio.c

+33-1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,39 @@ WORD wOriginalAttributes = 0;
143143
int Update_Graphic_Mode(int attribute, int value, boolean set);
144144
const REBYTE* Parse_ANSI_sequence(const REBYTE *cp, const REBYTE *ep);
145145

146+
// Virtual key conversion table. Sorted by first column!
147+
const WORD Key_To_Event[] = {
148+
VK_SHIFT, EVK_SHIFT,
149+
VK_CONTROL, EVK_CONTROL,
150+
VK_MENU, EVK_ALT,
151+
VK_PAUSE, EVK_PAUSE,
152+
VK_CAPITAL, EVK_CAPITAL,
153+
VK_ESCAPE, EVK_ESCAPE,
154+
VK_PRIOR, EVK_PAGE_UP,
155+
VK_NEXT, EVK_PAGE_DOWN,
156+
VK_END, EVK_END,
157+
VK_HOME, EVK_HOME,
158+
VK_LEFT, EVK_LEFT,
159+
VK_UP, EVK_UP,
160+
VK_RIGHT, EVK_RIGHT,
161+
VK_DOWN, EVK_DOWN,
162+
VK_INSERT, EVK_INSERT,
163+
VK_DELETE, EVK_DELETE,
164+
VK_F1, EVK_F1,
165+
VK_F2, EVK_F2,
166+
VK_F3, EVK_F3,
167+
VK_F4, EVK_F4,
168+
VK_F5, EVK_F5,
169+
VK_F6, EVK_F6,
170+
VK_F7, EVK_F7,
171+
VK_F8, EVK_F8,
172+
VK_F9, EVK_F9,
173+
VK_F10, EVK_F10,
174+
VK_F11, EVK_F11,
175+
VK_F12, EVK_F12,
176+
0, 0
177+
};
178+
146179
//**********************************************************************
147180

148181
BOOL WINAPI Handle_Break(DWORD dwCtrlType)
@@ -596,7 +629,6 @@ static void Close_StdIO_Local(void)
596629
return DR_DONE;
597630
}
598631

599-
extern const WORD Key_To_Event[]; // in host-event.c
600632
/***********************************************************************
601633
**
602634
*/ DEVICE_CMD Poll_IO(REBREQ *req)

src/os/win32/host-event.c

+2-34
Original file line numberDiff line numberDiff line change
@@ -70,46 +70,14 @@ extern HWND Focused_Window;
7070
#define IS_LAYERED(hwnd) ((WS_EX_LAYERED & GetWindowLongPtr(hwnd, GWL_EXSTYLE)) > 0)
7171
#define GOB_FROM_HWND(hwnd) (REBGOB *)GetWindowLongPtr(hwnd, GWLP_USERDATA)
7272

73-
//***** Constants *****
74-
75-
// Virtual key conversion table. Sorted by first column!
76-
const WORD Key_To_Event[] = {
77-
VK_SHIFT, EVK_SHIFT,
78-
VK_CONTROL, EVK_CONTROL,
79-
VK_MENU, EVK_ALT,
80-
VK_PAUSE, EVK_PAUSE,
81-
VK_CAPITAL, EVK_CAPITAL,
82-
VK_ESCAPE, EVK_ESCAPE,
83-
VK_PRIOR, EVK_PAGE_UP,
84-
VK_NEXT, EVK_PAGE_DOWN,
85-
VK_END, EVK_END,
86-
VK_HOME, EVK_HOME,
87-
VK_LEFT, EVK_LEFT,
88-
VK_UP, EVK_UP,
89-
VK_RIGHT, EVK_RIGHT,
90-
VK_DOWN, EVK_DOWN,
91-
VK_INSERT, EVK_INSERT,
92-
VK_DELETE, EVK_DELETE,
93-
VK_F1, EVK_F1,
94-
VK_F2, EVK_F2,
95-
VK_F3, EVK_F3,
96-
VK_F4, EVK_F4,
97-
VK_F5, EVK_F5,
98-
VK_F6, EVK_F6,
99-
VK_F7, EVK_F7,
100-
VK_F8, EVK_F8,
101-
VK_F9, EVK_F9,
102-
VK_F10, EVK_F10,
103-
VK_F11, EVK_F11,
104-
VK_F12, EVK_F12,
105-
0, 0
106-
};
73+
10774

10875
//***** Externs *****
10976

11077
extern HCURSOR Cursor;
11178
extern void Done_Device(int handle, int error);
11279
extern void Paint_Window(HWND window);
80+
extern const WORD Key_To_Event[]; // in dev-stdio.c
11381

11482

11583

0 commit comments

Comments
 (0)