aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2020-02-07 18:47:51 -0500
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2020-02-07 18:47:51 -0500
commitca16e250d531b6cc39c16d3f958c4e2f7bb13979 (patch)
tree4ca971555d5dcdb369526c9d25c653ca1479de43
parent2047b26ccd29fbda123b328f88aad15566a6a705 (diff)
Support more Alt and Shift+Alt keys in Win32 curses.
-rw-r--r--modules/textadept/keys.lua4
-rw-r--r--src/pdcurses.patch28
2 files changed, 26 insertions, 6 deletions
diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua
index 05de0116..2ed43ed3 100644
--- a/modules/textadept/keys.lua
+++ b/modules/textadept/keys.lua
@@ -256,8 +256,8 @@ module('textadept.keys')]]
-- * Control+Shift and Control+Meta+Shift keys are not recognized.
-- * Modifiers for function keys F1-F12 are not recognized.
-- For pdcurses (Win32):
--- * Control+Shift+Letter keys are not recognized. Other Control+Shift keys
--- are.
+-- * Many Control+Symbol keys are not recognized, but most
+-- Control+Shift+Symbol keys are.
-- * Ctrl+Meta+Symbol keys are not recognized.
--
-- Unassigned keys (~ denotes keys reserved by the operating system):
diff --git a/src/pdcurses.patch b/src/pdcurses.patch
index 4e1d663f..d22b3d10 100644
--- a/src/pdcurses.patch
+++ b/src/pdcurses.patch
@@ -1,6 +1,6 @@
---- a/wincon/pdckbd.c 2018-01-29 22:49:25.000000000 -0500
-+++ b/wincon/pdckbd.c 2018-11-10 21:40:57.000000000 -0500
-@@ -102,16 +102,16 @@
+--- a/wincon/pdckbd.c 2019-09-04 16:08:02.000000000 -0400
++++ b/wincon/pdckbd.c 2020-02-07 16:00:29.000000000 -0500
+@@ -100,16 +80,16 @@
{PAD0, 0x30, CTL_PAD0, ALT_PAD0, 11 }, /* 45 VK_INSERT */
{PADSTOP, 0x2E, CTL_PADSTOP, ALT_PADSTOP,12 }, /* 46 VK_DELETE */
{0, 0, 0, 0, 0 }, /* 47 VK_HELP */
@@ -27,7 +27,7 @@
{0, 0, 0, 0, 0 }, /* 58 */
{0, 0, 0, 0, 0 }, /* 59 */
{0, 0, 0, 0, 0 }, /* 60 */
-@@ -119,32 +119,32 @@
+@@ -117,32 +97,32 @@
{0, 0, 0, 0, 0 }, /* 62 */
{0, 0, 0, 0, 0 }, /* 63 */
{0, 0, 0, 0, 0 }, /* 64 */
@@ -86,3 +86,23 @@
{0, 0, 0, 0, 0 }, /* 91 VK_LWIN */
{0, 0, 0, 0, 0 }, /* 92 VK_RWIN */
{0, 0, 0, 0, 0 }, /* 93 VK_APPS */
+@@ -194,16 +174,16 @@
+ {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
+- {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
+- {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
+- {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
++ {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0x3B, 0x3A, 0, 0x3B, 0}, {0x3D, 0x2B, 0, 0x3D, 0},
++ {0x2C, 0x3C, 0, 0x2C, 0}, {0x2D, 0x5F, 0, 0x2D, 0}, {0x2E, 0x3E, 0, 0x2E, 0}, {0x2F, 0x3F, 0, 0x2F, 0},
++ {0x60, 0x7E, 0, 0x60, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}, {0, 0, 0, 0,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