summaryrefslogtreecommitdiff
path: root/packages/xkbd
diff options
context:
space:
mode:
authorPaul Sokolovsky <pmiscml@gmail.com>2007-11-27 20:47:28 +0000
committerPaul Sokolovsky <pmiscml@gmail.com>2007-11-27 20:47:28 +0000
commit708032118904d36953ce1f0140a2d4d65e7ea2db (patch)
treec93a5e49db9d2a927d4c5dc19e6af0339bf262e6 /packages/xkbd
parent5b37ae936804e8b3473d2a07819c3c894f26fd98 (diff)
xkbd 0.8.15: Add default common slides.
* xkbd has supports for "slides", where instead of just click on key, there's a gesture up, down, left, or right. These can be specified in keyboard definition, and xkbd has defaults for each 4. But of 4 pristine defaults, only 1 is useful - up is shift+key. The other are for ctrl, alt, etc modifiers, which are less useful in real life. Instead, have following defaults: left - backspace, right - space, down - Enter. This means that on common xkbd file w/o slide definition, making a right-to-left gesture anywhere on keyboard will be equivalent of backspace, etc.
Diffstat (limited to 'packages/xkbd')
-rw-r--r--packages/xkbd/xkbd-0.8.15/add-default-common-slides.patch44
-rw-r--r--packages/xkbd/xkbd_0.8.15.bb3
2 files changed, 46 insertions, 1 deletions
diff --git a/packages/xkbd/xkbd-0.8.15/add-default-common-slides.patch b/packages/xkbd/xkbd-0.8.15/add-default-common-slides.patch
new file mode 100644
index 0000000000..0423ee1eed
--- /dev/null
+++ b/packages/xkbd/xkbd-0.8.15/add-default-common-slides.patch
@@ -0,0 +1,44 @@
+diff -r 6b20ef8fbdee src/kb.c
+--- a/src/kb.c Tue Nov 27 21:28:21 2007 +0200
++++ b/src/kb.c Tue Nov 27 22:27:09 2007 +0200
+@@ -954,6 +954,13 @@ void kb_send_keypress(button *b)
+ int slide_flag = 0;
+
+ struct keycodeEntry vk_keycodes[10];
++
++ static KeySym ksSpace, ksBackSpace, ksReturn;
++ if (!ksSpace) {
++ ksSpace = XStringToKeysym("space");
++ ksBackSpace = XStringToKeysym("BackSpace");
++ ksReturn = XStringToKeysym("Return");
++ }
+
+ if (b->kb->state & KB_STATE_SHIFT || b->kb->state & KB_STATE_CAPS)
+ {
+@@ -981,20 +988,17 @@ void kb_send_keypress(button *b)
+ ks = b->slide_up_ks;
+ if (ks == 0) ks = b->shift_ks;
+ break;
+- case down : /* hold ctrl */
++ case down :
+ ks = b->slide_down_ks;
+- if (ks == 0) slide_flag = KB_STATE_CTRL;
++ if (ks == 0) ks = ksReturn;
+ break;
+- case left : /* hold alt */
++ case left :
+ ks = b->slide_left_ks;
+- if (ks == 0)
+- {
+- ks = b->mod_ks;
+- slide_flag = KB_STATE_MOD;
+- }
++ if (ks == 0) ks = ksBackSpace;
+ break;
+- case right : /* hold alt */
++ case right :
+ ks = b->slide_right_ks;
++ if (ks == 0) ks = ksSpace;
+ break;
+ case none:
+ break;
diff --git a/packages/xkbd/xkbd_0.8.15.bb b/packages/xkbd/xkbd_0.8.15.bb
index 2d070fd7ad..f27189f597 100644
--- a/packages/xkbd/xkbd_0.8.15.bb
+++ b/packages/xkbd/xkbd_0.8.15.bb
@@ -2,9 +2,10 @@ SRC_URI = "http://handhelds.org/~mallum/xkbd/xkbd-${PV}-CVS.tar.gz \
file://libtool-lossage.patch;patch=1;pnum=1 \
file://fix-equalsign.patch;patch=1 \
file://fix-circumkey.patch;patch=1 \
+ file://add-default-common-slides.patch;patch=1 \
file://xkbd.png"
LICENSE = "GPL"
-PR = "r2"
+PR = "r3"
SECTION = "x11"
DEPENDS = "libxpm libxtst libxft"