summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2019-11-15 20:45:48 (GMT)
committerdgp <dgp@users.sourceforge.net>2019-11-15 20:45:48 (GMT)
commite7890d24922a6058d88dda2bcb7cc87989ab7800 (patch)
treeac1574045b87fbb0f510ff8ac9cee43e2dfe6ef5 /win
parentb61f8b2b16911a35398b1eb3d20ede6257959408 (diff)
parent21c80c279f1a6edee55718c40818e5a3f59e1dfb (diff)
downloadtk-e7890d24922a6058d88dda2bcb7cc87989ab7800.zip
tk-e7890d24922a6058d88dda2bcb7cc87989ab7800.tar.gz
tk-e7890d24922a6058d88dda2bcb7cc87989ab7800.tar.bz2
merge 8.6
Diffstat (limited to 'win')
-rw-r--r--win/tkWinKey.c74
-rw-r--r--win/tkWinPointer.c4
2 files changed, 40 insertions, 38 deletions
diff --git a/win/tkWinKey.c b/win/tkWinKey.c
index 4130579..8a83874 100644
--- a/win/tkWinKey.c
+++ b/win/tkWinKey.c
@@ -11,6 +11,7 @@
*/
#include "tkWinInt.h"
+#include "X11/XF86keysym.h"
/*
* The keymap table holds mappings of Windows keycodes to X keysyms. If
@@ -21,46 +22,47 @@
* like a worthwhile improvement to use the table.
*/
-#define MAX_KEYCODE 179 /* VK_MEDIA_PLAY_PAUSE is the last entry in our table below */
+#define MAX_KEYCODE 183 /* VK_LAUNCH_APP2 is the last entry in our table below */
/* cf. https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx */
static const KeySym keymap[] = {
- NoSymbol, NoSymbol, NoSymbol, XK_Cancel, NoSymbol,
- NoSymbol, NoSymbol, NoSymbol, XK_BackSpace, XK_Tab,
- NoSymbol, NoSymbol, XK_Clear, XK_Return, NoSymbol,
- NoSymbol, XK_Shift_L, XK_Control_L, XK_Alt_L, XK_Pause,
- XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, NoSymbol,
- NoSymbol, NoSymbol, XK_Escape, NoSymbol, NoSymbol,
- NoSymbol, NoSymbol, XK_space, XK_Prior, XK_Next,
- XK_End, XK_Home, XK_Left, XK_Up, XK_Right,
- XK_Down, XK_Select, XK_Print, XK_Execute, NoSymbol,
- XK_Insert, XK_Delete, XK_Help, NoSymbol, NoSymbol,
- NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol,
- NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol,
- NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol,
- NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol,
- NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol,
- NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol,
- NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol,
- NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol,
- NoSymbol, XK_Win_L, XK_Win_R, XK_App, NoSymbol,
- NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol,
- NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol,
- NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol,
- NoSymbol, NoSymbol, XK_F1, XK_F2, XK_F3,
- XK_F4, XK_F5, XK_F6, XK_F7, XK_F8,
- XK_F9, XK_F10, XK_F11, XK_F12, XK_F13,
- XK_F14, XK_F15, XK_F16, XK_F17, XK_F18,
- XK_F19, XK_F20, XK_F21, XK_F22, XK_F23,
- XK_F24, NoSymbol, NoSymbol, NoSymbol, NoSymbol,
- NoSymbol, NoSymbol, NoSymbol, NoSymbol, XK_Num_Lock,
- XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, NoSymbol,
+ NoSymbol, NoSymbol, NoSymbol, XK_Cancel, NoSymbol, /*0 0x0*/
+ NoSymbol, NoSymbol, NoSymbol, XK_BackSpace, XK_Tab, /*5 0x5*/
+ NoSymbol, NoSymbol, XK_Clear, XK_Return, NoSymbol, /*10 0xA*/
+ NoSymbol, XK_Shift_L, XK_Control_L, XK_Alt_L, XK_Pause, /*15 0xE*/
+ XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*20 0x14*/
+ NoSymbol, NoSymbol, XK_Escape, NoSymbol, NoSymbol, /*25 0x19*/
+ NoSymbol, NoSymbol, XK_space, XK_Prior, XK_Next, /*30 0x1E*/
+ XK_End, XK_Home, XK_Left, XK_Up, XK_Right, /*35 0x23*/
+ XK_Down, XK_Select, XK_Print, XK_Execute, NoSymbol, /*40 0x28*/
+ XK_Insert, XK_Delete, XK_Help, NoSymbol, NoSymbol, /*45 0x2D*/
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*50 0x32*/
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*55 0x37*/
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*60 0x3C*/
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*65 0x41*/
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*70 0x46*/
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*75 0x4B*/
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*80 0x50*/
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*85 0x55*/
+ NoSymbol, XK_Win_L, XK_Win_R, XK_App, NoSymbol, /*90 0x5A*/
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*95 0x5F*/
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*100 0x64*/
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*105 0x69*/
+ NoSymbol, NoSymbol, XK_F1, XK_F2, XK_F3, /*110 0x6E*/
+ XK_F4, XK_F5, XK_F6, XK_F7, XK_F8, /*115 0x73*/
+ XK_F9, XK_F10, XK_F11, XK_F12, XK_F13, /*120 0x78*/
+ XK_F14, XK_F15, XK_F16, XK_F17, XK_F18, /*125 0x7D*/
+ XK_F19, XK_F20, XK_F21, XK_F22, XK_F23, /*130 0x82*/
+ XK_F24, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*135 0x87*/
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol, XK_Num_Lock, /*140 0x8C*/
+ XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*145 0x91*/
NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*150 0x96*/
- NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*155 0x9b*/
- NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*160 0xa0*/
- NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*165 0xa5*/
- NoSymbol, NoSymbol, NoSymbol, XK_XF86AudioMute, XK_XF86AudioLowerVolume, /*170 0xaa*/
- XK_XF86AudioRaiseVolume, XK_XF86AudioNext, XK_XF86AudioPrev, XK_XF86AudioStop, XK_XF86AudioPlay /*175 0xaf*/
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*155 0x9B*/
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*160 0xA0*/
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*165 0xA5*/
+ NoSymbol, NoSymbol, NoSymbol, XF86XK_AudioMute, XF86XK_AudioLowerVolume, /*170 0xAA*/
+ XF86XK_AudioRaiseVolume, XF86XK_AudioNext, XF86XK_AudioPrev, XF86XK_AudioStop, XF86XK_AudioPlay, /*175 0xAF*/
+ XF86XK_Mail, XF86XK_AudioMedia, XF86XK_Launch0, XF86XK_Launch1 /*180 0xB4*/
};
/*
diff --git a/win/tkWinPointer.c b/win/tkWinPointer.c
index 2b8656b..e7e041f 100644
--- a/win/tkWinPointer.c
+++ b/win/tkWinPointer.c
@@ -362,8 +362,8 @@ void TkSetCursorPos(
int y)
{
INPUT input;
- unsigned xscreen = (GetSystemMetrics(SM_CXSCREEN) - 1);
- unsigned yscreen = (GetSystemMetrics(SM_CYSCREEN) - 1);
+ int xscreen = (int)(GetSystemMetrics(SM_CXSCREEN) - 1);
+ int yscreen = (int)(GetSystemMetrics(SM_CYSCREEN) - 1);
input.type = INPUT_MOUSE;
input.mi.dx = (x * 65535 + xscreen/2) / xscreen;