Lines Matching refs:keysym

54 int track_mod_state(rfbKeySym keysym, rfbBool down, rfbBool set);
61 int add_keysym(KeySym keysym);
64 int sloppy_key_check(int key, rfbBool down, rfbKeySym keysym, int *new_kc);
73 void keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client);
81 static void xkb_tweak_keyboard(rfbBool down, rfbKeySym keysym,
84 static void modifier_tweak_keyboard(rfbBool down, rfbKeySym keysym,
86 static void pipe_keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client);
136 KeySym keysym; in clear_modifiers()
155 keysym = keymap[ (i - minkey) * syms_per_keycode + j ]; in clear_modifiers()
156 if (keysym == NoSymbol || ! ismodkey(keysym)) { in clear_modifiers()
159 keycode = XKeysymToKeycode(dpy, keysym); in clear_modifiers()
164 keysyms[kcount] = keysym; in clear_modifiers()
165 str = XKeysymToString(keysym); in clear_modifiers()
180 keysym = keysyms[i]; in clear_modifiers()
189 "keycode=0x%x\n", keystrs[i], keysym, keycode); in clear_modifiers()
209 int track_mod_state(rfbKeySym keysym, rfbBool down, rfbBool set) { in track_mod_state() argument
210 KeySym sym = (KeySym) keysym; in track_mod_state()
477 int add_keysym(KeySym keysym) { in add_keysym() argument
488 if (!keysym) {} in add_keysym()
504 if (keysym == NoSymbol) { in add_keysym()
509 if (added_keysyms[n] == keysym) { in add_keysym()
538 newks[0] = keysym; /* XXX remove me */ in add_keysym()
541 newks[i] = keysym; in add_keysym()
553 if (alltime_added_keysyms[j] == keysym) { in add_keysym()
560 str = XKeysymToString(keysym); in add_keysym()
562 "0x%x \"%s\"\n", kc, keysym, str ? str : "null"); in add_keysym()
565 alltime_added_keysyms[alltime_num++] = keysym; in add_keysym()
570 added_keysyms[kc] = keysym; in add_keysym()
910 int sloppy_key_check(int key, rfbBool down, rfbKeySym keysym, int *new_kc) { in sloppy_key_check() argument
917 if (!key || !down || !keysym || !new_kc) {} in sloppy_key_check()
921 if (!down && !keycode_state[key] && !IsModifierKey(keysym)) { in sloppy_key_check()
973 static void xkb_tweak_keyboard(rfbBool down, rfbKeySym keysym, in xkb_tweak_keyboard() argument
975 if (!client || !down || !keysym) {} /* unused vars warning: */ in xkb_tweak_keyboard()
982 KeySym keysym, *keymap; in switch_to_xkb_if_better() local
1043 keysym = keymap[(i - minkey) * syms_per_keycode + 1]; in switch_to_xkb_if_better()
1044 if (keysym != NoSymbol) { in switch_to_xkb_if_better()
1048 keysym = keymap[(i - minkey) * syms_per_keycode + 0]; in switch_to_xkb_if_better()
1049 if (keysym == NoSymbol) { in switch_to_xkb_if_better()
1052 XConvertCase(keysym, &lower, &upper); in switch_to_xkb_if_better()
1065 keysym = keymap[(i-minkey) * syms_per_keycode + j]; in switch_to_xkb_if_better()
1067 if (k == 0 && keysym != NoSymbol) { in switch_to_xkb_if_better()
1071 char *str = XKeysymToString(keysym); in switch_to_xkb_if_better()
1079 if (keysym == must) { in switch_to_xkb_if_better()
1099 keysym = keymap[(kc-minkey) * in switch_to_xkb_if_better()
1102 j2, keysym); in switch_to_xkb_if_better()
1153 keysym = XkbKeycodeToKeysym(dpy, kc, grp, lvl); in switch_to_xkb_if_better()
1154 if (keysym == NoSymbol) { in switch_to_xkb_if_better()
1158 if (keysym == must_have[k]) { in switch_to_xkb_if_better()
1187 keysym = must_have[k]; in switch_to_xkb_if_better()
1188 if (keysym == NoSymbol) { in switch_to_xkb_if_better()
1204 name = XKeysymToString(keysym); in switch_to_xkb_if_better()
1205 rfbLog(" %s %s 0x%lx %s\n", xx, xn, keysym, in switch_to_xkb_if_better()
1575 static void xkb_tweak_keyboard(rfbBool down, rfbKeySym keysym, in xkb_tweak_keyboard() argument
1594 if (!client || !down || !keysym) {} /* unused vars warning: */ in xkb_tweak_keyboard()
1643 char *str = XKeysymToString(keysym); in xkb_tweak_keyboard()
1651 down ? "down" : "up", (int) keysym, str ? str : "null"); in xkb_tweak_keyboard()
1679 if (keysym != xkbkeysyms[kc][grp][lvl]) { in xkb_tweak_keyboard()
1690 s2 = XKeysymToString(keysym); in xkb_tweak_keyboard()
1694 kc, kc, grp+1, lvl+1, keysym, s2, s1); in xkb_tweak_keyboard()
1748 if (!found && add_keysyms && keysym && ! IsModifierKey(keysym)) { in xkb_tweak_keyboard()
1749 int new_kc = add_keysym(keysym); in xkb_tweak_keyboard()
1760 char *str = XKeysymToString(keysym); in xkb_tweak_keyboard()
1762 "*keystroke ignored*\n", keysym, str ? str : "null"); in xkb_tweak_keyboard()
1784 if (khints && keysym < 0x100) { in xkb_tweak_keyboard()
1785 int ks = (int) keysym, j; in xkb_tweak_keyboard()
1832 if (khints && keysym < 0x100 && kc_f[l] < 0x100) { in xkb_tweak_keyboard()
1833 score_hint[(int) keysym][kc_f[l]] = (short) score[l]; in xkb_tweak_keyboard()
1854 if (khints && keysym < 0x100) { in xkb_tweak_keyboard()
1856 int ks = (int) keysym; in xkb_tweak_keyboard()
1897 if (keysym == Ks_last_down[i]) { in xkb_tweak_keyboard()
1942 if (ks != NoSymbol && ks == keysym) { in xkb_tweak_keyboard()
2011 if (sloppy_key_check(Kc_f, down, keysym, &new_kc)) { in xkb_tweak_keyboard()
2032 Ks_last_down[0] = keysym; in xkb_tweak_keyboard()
2189 if (keysym >= 'A' && keysym <= 'Z') { in xkb_tweak_keyboard()
2500 KeySym keysym, *keymap; in initialize_modtweak()
2529 keysym = keymap[(i - minkey) * syms_per_keycode + 1]; in initialize_modtweak()
2530 if (keysym != NoSymbol) { in initialize_modtweak()
2534 keysym = keymap[(i - minkey) * syms_per_keycode + 0]; in initialize_modtweak()
2535 if (keysym == NoSymbol) { in initialize_modtweak()
2538 XConvertCase(keysym, &lower, &upper); in initialize_modtweak()
2558 keysym = keymap[(i-minkey)*syms_per_keycode+j]; in initialize_modtweak()
2559 sym = XKeysymToString(keysym); in initialize_modtweak()
2575 keysym = keymap[ (i - minkey) * syms_per_keycode + j ]; in initialize_modtweak()
2576 if ( keysym >= ' ' && keysym < 0x100 in initialize_modtweak()
2577 && i == XKeysymToKeycode(dpy, keysym) ) { in initialize_modtweak()
2578 if (use_lowest_index && keycodes[keysym] != NoSymbol) { in initialize_modtweak()
2581 keycodes[keysym] = i; in initialize_modtweak()
2582 modifiers[keysym] = j; in initialize_modtweak()
2658 static void modifier_tweak_keyboard(rfbBool down, rfbKeySym keysym, in modifier_tweak_keyboard() argument
2662 if (!down || !keysym || !client) {} in modifier_tweak_keyboard()
2671 xkb_tweak_keyboard(down, keysym, client); in modifier_tweak_keyboard()
2676 down ? "down" : "up", (int) keysym); in modifier_tweak_keyboard()
2680 if (keysym == sym) { \ in modifier_tweak_keyboard()
2692 if ( down && keysym >= ' ' && keysym < 0x100 ) { in modifier_tweak_keyboard()
2695 if (watch_capslock && keysym >= 'A' && keysym <= 'Z') { in modifier_tweak_keyboard()
2703 k = XKeysymToKeycode(dpy, (KeySym) keysym); in modifier_tweak_keyboard()
2707 tweak_mod(modifiers[keysym], True); in modifier_tweak_keyboard()
2708 k = keycodes[keysym]; in modifier_tweak_keyboard()
2712 k = XKeysymToKeycode(dpy, (KeySym) keysym); in modifier_tweak_keyboard()
2715 if (k == NoSymbol && add_keysyms && ! IsModifierKey(keysym)) { in modifier_tweak_keyboard()
2716 int new_kc = add_keysym(keysym); in modifier_tweak_keyboard()
2724 if (sloppy_key_check((int) k, down, keysym, &new_kc)) { in modifier_tweak_keyboard()
2730 char *str = XKeysymToString(keysym); in modifier_tweak_keyboard()
2732 "KeyCode 0x%x%s\n", (int) keysym, str ? str : "null", in modifier_tweak_keyboard()
2742 tweak_mod(modifiers[keysym], False); in modifier_tweak_keyboard()
2834 static void apply_remap(rfbKeySym *keysym, int *isbutton) { in apply_remap() argument
2838 if (remap->before == *keysym) { in apply_remap()
2839 *keysym = remap->after; in apply_remap()
2863 static void pipe_keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) { in pipe_keyboard() argument
2869 apply_remap(&keysym, &isbutton); in pipe_keyboard()
2872 int mask, button = (int) keysym; in pipe_keyboard()
2911 v4l_key_command(down, keysym, client); in pipe_keyboard()
2913 console_key_command(down, keysym, client); in pipe_keyboard()
2915 uinput_key_command(down, keysym, client); in pipe_keyboard()
2917 macosx_key_command(down, keysym, client); in pipe_keyboard()
2919 vnc_reflect_send_key((uint32_t) keysym, down); in pipe_keyboard()
2939 name = XKeysymToString(keysym); in pipe_keyboard()
2943 keysym, name ? name : "null", down ? "KeyPress" : "KeyRelease"); in pipe_keyboard()
3050 void keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) { in keyboard() argument
3073 str = XKeysymToString((KeySym) keysym); in keyboard()
3076 down ? "down":"up", (int) keysym, str ? str : "null", in keyboard()
3080 if (keysym <= 0) { in keyboard()
3088 "unixpw_denied=1 state\n", (int) keysym); in keyboard()
3096 unixpw_keystroke(down, keysym, 0); in keyboard()
3102 if (keysym == last_keysym && down == last_down) { in keyboard()
3105 down, keysym); in keyboard()
3113 if (keysym == XK_Scroll_Lock || keysym == XK_Num_Lock || in keyboard()
3114 keysym == XK_Caps_Lock || keysym == XK_Shift_Lock) { in keyboard()
3117 down, keysym); in keyboard()
3120 } else if (keysym >= XK_KP_0 && keysym <= XK_KP_9) { in keyboard()
3124 down, keysym); in keyboard()
3126 keysym = (keysym - XK_KP_0) + XK_0; in keyboard()
3127 } else if (keysym == XK_KP_Decimal) { in keyboard()
3130 down, keysym); in keyboard()
3132 keysym = XK_period; in keyboard()
3139 last_keysym = keysym; in keyboard()
3143 last_rfb_keysym = keysym; in keyboard()
3159 key_history[idx].sym = keysym; in keyboard()
3163 if (down && (keysym == XK_Alt_L || keysym == XK_Super_L)) { in keyboard()
3177 } else if (ks == keysym && ks == XK_Alt_L) { in keyboard()
3179 } else if (ks == keysym && ks == XK_Super_L) { in keyboard()
3187 } else if (run == 3 && keysym == XK_Alt_L) { in keyboard()
3190 } else if (run == 4 && keysym == XK_Alt_L) { in keyboard()
3193 } else if (run == 5 && keysym == XK_Alt_L) { in keyboard()
3195 } else if (run == 3 && keysym == XK_Super_L) { in keyboard()
3198 } else if (run == 4 && keysym == XK_Super_L) { in keyboard()
3201 } else if (run == 5 && keysym == XK_Super_L) { in keyboard()
3223 if (keysym == max_keyrepeat_last_keysym) { in keyboard()
3226 "%.4f %.4f\n", keysym, down ? "down":"up ", in keyboard()
3237 max_keyrepeat_last_keysym != keysym) { in keyboard()
3247 "%.4f %.4f\n", keysym, down ? "down":"up ", in keyboard()
3249 max_keyrepeat_last_keysym = keysym; in keyboard()
3255 "%.4f %.4f\n", keysym, down ? "down":"up ", in keyboard()
3259 max_keyrepeat_last_keysym = keysym; in keyboard()
3265 pipe_keyboard(down, keysym, client); /* MACOSX here. */ in keyboard()
3272 last_keysym = keysym; in keyboard()
3275 last_rfb_keysym = keysym; in keyboard()
3297 track_mod_state(keysym, down, TRUE); /* ignores remaps */ in keyboard()
3303 last_keysym = keysym; in keyboard()
3306 last_rfb_keysym = keysym; in keyboard()
3316 apply_remap(&keysym, &isbutton); in keyboard()
3326 } else if (! xrecord_skip_keysym(keysym)) { in keyboard()
3330 xrecord_keysym = keysym; in keyboard()
3333 char *str = XKeysymToString(keysym); in keyboard()
3341 int mask, button = (int) keysym; in keyboard()
3384 modifier_tweak_keyboard(down, keysym, client); in keyboard()
3394 k = XKeysymToKeycode(dpy, (KeySym) keysym); in keyboard()
3396 if (k == NoSymbol && add_keysyms && ! IsModifierKey(keysym)) { in keyboard()
3397 int new_kc = add_keysym(keysym); in keyboard()
3403 char *str = XKeysymToString(keysym); in keyboard()
3405 (int) keysym, str ? str : "null", (int) k, in keyboard()