From 6ab86512888d4242f0e2912343e9da7566e8ab53 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 13 Oct 2019 19:49:46 +0000 Subject: Fix 3 bugs in X11 keysym translations, originating from X11-r5 which were fixed in X11-r6. Add 3 test-cases, proving each of them. --- generic/ks_names.h | 4 +++- tests/bind.test | 23 ++++++++++++++++++++++- xlib/X11/keysymdef.h | 2 ++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/generic/ks_names.h b/generic/ks_names.h index e38c35c..3386ec0 100644 --- a/generic/ks_names.h +++ b/generic/ks_names.h @@ -332,6 +332,7 @@ { "Otilde", 0xD5 }, { "Odiaeresis", 0xD6 }, { "multiply", 0xD7 }, +{ "Oslash", 0xD8 }, { "Ooblique", 0xD8 }, { "Ugrave", 0xD9 }, { "Uacute", 0xDA }, @@ -464,8 +465,8 @@ { "itilde", 0x3B5 }, { "lcedilla", 0x3B6 }, { "emacron", 0x3BA }, -{ "gacute", 0x3BB }, { "gcedilla", 0x3BB }, +{ "gacute", 0x3BB }, { "tslash", 0x3BC }, { "ENG", 0x3BD }, { "eng", 0x3BF }, @@ -720,6 +721,7 @@ { "Greek_EPSILONaccent", 0x7A2 }, { "Greek_ETAaccent", 0x7A3 }, { "Greek_IOTAaccent", 0x7A4 }, +{ "Greek_IOTAdieresis", 0x7A5 }, { "Greek_IOTAdiaeresis", 0x7A5 }, { "Greek_IOTAaccentdiaeresis", 0x7A6 }, { "Greek_OMICRONaccent", 0x7A7 }, diff --git a/tests/bind.test b/tests/bind.test index a991f01..e7b3db3 100644 --- a/tests/bind.test +++ b/tests/bind.test @@ -5918,13 +5918,34 @@ test bind-28.8 {keysym names} -setup { } -cleanup { destroy .t.f } -result {X x {keysym X}} -test bind-28.9 {keysym names, deprecated X11 names (e.g. "Eth") are translated into non-deprecated version (like "ETH")} -body { +test bind-28.9 {keysym names, Eth -> ETH} -body { frame .t.f -class Test -width 150 -height 100 bind .t.f foo bind .t.f } -cleanup { destroy .t.f } -result {} +test bind-28.10 {keysym names, Ooblique -> Oslash} -body { + frame .t.f -class Test -width 150 -height 100 + bind .t.f foo + bind .t.f +} -cleanup { + destroy .t.f +} -result {} +test bind-28.11 {keysym names, gcedilla} -body { + frame .t.f -class Test -width 150 -height 100 + bind .t.f foo + bind .t.f +} -cleanup { + destroy .t.f +} -result {} +test bind-28.12 {keysym names, Greek_IOTAdiaeresis -> Greek_IOTAdieresis} -body { + frame .t.f -class Test -width 150 -height 100 + bind .t.f foo + bind .t.f +} -cleanup { + destroy .t.f +} -result {} test bind-29.1 {Tcl_BackgroundError procedure} -setup { diff --git a/xlib/X11/keysymdef.h b/xlib/X11/keysymdef.h index a7c654d..460c72d 100644 --- a/xlib/X11/keysymdef.h +++ b/xlib/X11/keysymdef.h @@ -397,6 +397,7 @@ SOFTWARE. #define XK_Otilde 0x0d5 #define XK_Odiaeresis 0x0d6 #define XK_multiply 0x0d7 +#define XK_Oslash 0x0d8 #define XK_Ooblique 0x0d8 #define XK_Ugrave 0x0d9 #define XK_Uacute 0x0da @@ -840,6 +841,7 @@ SOFTWARE. #define XK_Greek_EPSILONaccent 0x7a2 #define XK_Greek_ETAaccent 0x7a3 #define XK_Greek_IOTAaccent 0x7a4 +#define XK_Greek_IOTAdieresis 0x7a5 #define XK_Greek_IOTAdiaeresis 0x7a5 #define XK_Greek_OMICRONaccent 0x7a7 #define XK_Greek_UPSILONaccent 0x7a8 -- cgit v0.12