Introduction
Introduction Statistics Contact Development Disclaimer Help
Normalize keysym case. - sam - An updated version of the sam text editor.
git clone git://vernunftzentrum.de/sam.git
Log
Files
Refs
LICENSE
---
commit e20bc168dad45bb7d78e6fae536228d5e5198d3e
parent 7b1ed774258441e979c700fa1ff933c6b817778c
Author: Rob King <[email protected]>
Date: Sat, 10 Sep 2016 23:37:45 -0500
Normalize keysym case.
Diffstat:
samterm/samrc.c | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
---
diff --git a/samterm/samrc.c b/samterm/samrc.c
@@ -209,6 +209,16 @@ statetomask(const char *n, Namemapping *m)
return r;
}
+static KeySym
+nametokeysym(const char *n)
+{
+ KeySym k, l, u;
+
+ k = XStringToKeysym(n);
+ XConvertCase(k, &l, &u);
+ return l;
+}
+
static int
dirchord(const char *s1, const char *s2, const char *s3, const char *s4)
{
@@ -218,13 +228,13 @@ dirchord(const char *s1, const char *s2, const char *s3, …
static int
dirraw(const char *s1, const char *s2, const char *s3, const char *s4)
{
- return installbinding(statetomask(s1, modmapping), XStringToKeysym(s2), Kr…
+ return installbinding(statetomask(s1, modmapping), nametokeysym(s2), Kraw,…
}
static int
dircomposed(const char *s1, const char *s2, const char *s3, const char *s4)
{
- return installbinding(statetomask(s1, modmapping), XStringToKeysym(s2), Kc…
+ return installbinding(statetomask(s1, modmapping), nametokeysym(s2), Kcomp…
}
static int
@@ -232,7 +242,7 @@ dirrawliteral(const char *s1, const char *s2, const char *s…
{
if (strlen(s3) != 1)
return -1;
- return installbinding(statetomask(s1, modmapping), XStringToKeysym(s2), Kr…
+ return installbinding(statetomask(s1, modmapping), nametokeysym(s2), Kraw,…
}
static int
@@ -240,19 +250,19 @@ dircomposedliteral(const char *s1, const char *s2, const …
{
if (strlen(s3) != 1)
return -1;
- return installbinding(statetomask(s1, modmapping), XStringToKeysym(s2), Kc…
+ return installbinding(statetomask(s1, modmapping), nametokeysym(s2), Kcomp…
}
static int
dirbind(const char *s1, const char *s2, const char *s3, const char *s4)
{
- return installbinding(statetomask(s1, modmapping), XStringToKeysym(s2), Kc…
+ return installbinding(statetomask(s1, modmapping), nametokeysym(s2), Kcomm…
}
static int
dirunbind(const char *s1, const char *s2, const char *s3, const char *s4)
{
- return removebinding(statetomask(s1, modmapping), XStringToKeysym(s2));
+ return removebinding(statetomask(s1, modmapping), nametokeysym(s2));
}
static int
You are viewing proxied material from vernunftzentrum.de. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.