mirror of
git://git.suckless.org/svkbd
synced 2025-03-07 03:47:28 +00:00
code-style changes
This commit is contained in:
parent
8f6a7b5e42
commit
7c06a0caf5
17
svkbd.c
17
svkbd.c
@ -492,6 +492,7 @@ printkey(Key *k, KeySym mod)
|
|||||||
printdbg("Printing key %ld (shift=%d)\n", k->keysym, shift);
|
printdbg("Printing key %ld (shift=%d)\n", k->keysym, shift);
|
||||||
if (k->keysym == XK_Cancel)
|
if (k->keysym == XK_Cancel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
KeySym *keysym = &(k->keysym);
|
KeySym *keysym = &(k->keysym);
|
||||||
XIM xim = XOpenIM(dpy, 0, 0, 0);
|
XIM xim = XOpenIM(dpy, 0, 0, 0);
|
||||||
XIC xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing, NULL);
|
XIC xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing, NULL);
|
||||||
@ -519,8 +520,12 @@ printkey(Key *k, KeySym mod)
|
|||||||
void
|
void
|
||||||
simulate_keypress(KeySym keysym)
|
simulate_keypress(KeySym keysym)
|
||||||
{
|
{
|
||||||
if (!simulateoutput) return;
|
KeyCode code;
|
||||||
KeyCode code = XKeysymToKeycode(dpy, keysym);
|
|
||||||
|
if (!simulateoutput)
|
||||||
|
return;
|
||||||
|
|
||||||
|
code = XKeysymToKeycode(dpy, keysym);
|
||||||
if (code == 0)
|
if (code == 0)
|
||||||
code = tmp_remap(keysym);
|
code = tmp_remap(keysym);
|
||||||
XTestFakeKeyEvent(dpy, code, True, 0);
|
XTestFakeKeyEvent(dpy, code, True, 0);
|
||||||
@ -529,8 +534,12 @@ simulate_keypress(KeySym keysym)
|
|||||||
void
|
void
|
||||||
simulate_keyrelease(KeySym keysym)
|
simulate_keyrelease(KeySym keysym)
|
||||||
{
|
{
|
||||||
if (!simulateoutput) return;
|
KeyCode code;
|
||||||
KeyCode code = XKeysymToKeycode(dpy, keysym);
|
|
||||||
|
if (!simulateoutput)
|
||||||
|
return;
|
||||||
|
|
||||||
|
code = XKeysymToKeycode(dpy, keysym);
|
||||||
if (code == 0)
|
if (code == 0)
|
||||||
code = tmp_remap(keysym);
|
code = tmp_remap(keysym);
|
||||||
XTestFakeKeyEvent(dpy, code, False, 0);
|
XTestFakeKeyEvent(dpy, code, False, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user