Add xkbcommon macro for XkbKSIsKeypad and XkbKSIsDeadKey(k)
IsKeypad is used in symbols, but we'll just grab them both. It might be better to split parts of XKBfile.h out eventually.master
parent
a53b9b1ed3
commit
28de09e515
|
@ -52,6 +52,11 @@ typedef struct _XkbcDesc {
|
|||
XkbGeometryPtr geom;
|
||||
} XkbcDescRec, *XkbcDescPtr;
|
||||
|
||||
#define XkbcKSIsKeypad(k) \
|
||||
(((k) >= XK_KP_Space) && ((k) <= XK_KP_Equal))
|
||||
#define XkbcKSIsDeadKey(k) \
|
||||
(((k) >= XK_dead_grave) && ((k) <= XK_dead_semivoiced_sound))
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern char *
|
||||
|
|
|
@ -1802,7 +1802,7 @@ FindAutomaticType(int width, KeySym * syms, Atom * typeNameRtrn,
|
|||
{
|
||||
*typeNameRtrn = XkbcInternAtom("ALPHABETIC", False);
|
||||
}
|
||||
else if (syms && (XkbKSIsKeypad(syms[0]) || XkbKSIsKeypad(syms[1])))
|
||||
else if (syms && (XkbcKSIsKeypad(syms[0]) || XkbcKSIsKeypad(syms[1])))
|
||||
{
|
||||
*typeNameRtrn = XkbcInternAtom("KEYPAD", False);
|
||||
*autoType = True;
|
||||
|
@ -1823,7 +1823,7 @@ FindAutomaticType(int width, KeySym * syms, Atom * typeNameRtrn,
|
|||
*typeNameRtrn = XkbcInternAtom("FOUR_LEVEL_SEMIALPHABETIC",
|
||||
False);
|
||||
|
||||
else if (syms && (XkbKSIsKeypad(syms[0]) || XkbKSIsKeypad(syms[1])))
|
||||
else if (syms && (XkbcKSIsKeypad(syms[0]) || XkbcKSIsKeypad(syms[1])))
|
||||
*typeNameRtrn = XkbcInternAtom("FOUR_LEVEL_KEYPAD", False);
|
||||
else
|
||||
*typeNameRtrn = XkbcInternAtom("FOUR_LEVEL", False);
|
||||
|
|
Loading…
Reference in New Issue