diff options
| author | runge <runge> | 2007-11-13 03:10:34 +0000 |
|---|---|---|
| committer | runge <runge> | 2007-11-13 03:10:34 +0000 |
| commit | 2689647d6c7a9ab9c88faacf5dbc0200e9bc4a24 (patch) | |
| tree | bacf8e52c94d8f9eb9dc123208c0921a33a88f56 /x11vnc/remote.c | |
| parent | e24cf9491ccf696bc6b1ac36574861a343408cd0 (diff) | |
| download | libtdevnc-2689647d6c7a9ab9c88faacf5dbc0200e9bc4a24.tar.gz libtdevnc-2689647d6c7a9ab9c88faacf5dbc0200e9bc4a24.zip | |
x11vnc: add clear_locks (Caps_Lock, etc) action.
Diffstat (limited to 'x11vnc/remote.c')
| -rw-r--r-- | x11vnc/remote.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/x11vnc/remote.c b/x11vnc/remote.c index e607707..e01f08c 100644 --- a/x11vnc/remote.c +++ b/x11vnc/remote.c @@ -2246,6 +2246,33 @@ char *process_remote_cmd(char *cmd, int stringonly) { rfbLog("remote_cmd: disabling -clear_keys mode.\n"); clear_mods = 0; + } else if (!strcmp(p, "clear_all")) { + if (query) { + snprintf(buf, bufn, "ans=%s:%d", p, + clear_mods == 3); + goto qry; + } + rfbLog("remote_cmd: doing clear_all action.\n"); + clear_mods = 3; + clear_keys(); + clear_locks(); + + } else if (!strcmp(p, "clear_locks")) { + NOTAPP + rfbLog("remote_cmd: doing clear_locks action.\n"); + clear_locks(); + + } else if (!strcmp(p, "keystate")) { + int i, state[256]; + NOTAPP + for (i=0; i<256; i++) { + state[i] = 0; + } + get_keystate(state); + for (i=0; i<256; i++) { + fprintf(stderr, "keystate[%03d] %d\n", i, state[i]); + } + } else if (strstr(p, "remap") == p) { char *before, *old; COLON_CHECK("remap:") |
