Lines Matching refs:tr
107 free_key_translation(ptr->tr);
188 entry->tr = (key_translation *) xmalloc(sizeof(key_translation));
189 memset(entry->tr, 0, sizeof(key_translation));
190 entry->tr->scancode = scancode;
191 entry->tr->modifiers = modifiers;
202 key_translation *tr, **prev_next;
225 prev_next = &(entry->tr);
252 tr = (key_translation *) xmalloc(sizeof(key_translation));
253 memset(tr, 0, sizeof(key_translation));
256 if (!entry->tr)
257 entry->tr = tr;
259 *prev_next = tr;
260 prev_next = &tr->next;
261 tr->seq_keysym = seq_keysym;
796 key_translation tr = { 0, 0, 0, 0 };
801 ptr = entry ? entry->tr : NULL;
805 tr = *ptr;
806 if (tr.seq_keysym == 0) /* Normal scancode translation */
808 if (MASK_HAS_BITS(tr.modifiers, MapInhibitMask))
811 tr.scancode = 0;
812 return tr;
815 if (MASK_HAS_BITS(tr.modifiers, MapLocalStateMask))
821 tr.modifiers = MapLeftShiftMask;
831 if (MASK_HAS_BITS(tr.modifiers, MapShiftMask)
836 MASK_REMOVE_BITS(tr.modifiers, MapShiftMask);
840 tr.scancode, tr.modifiers));
852 tr.scancode = keycode - min_keycode;
859 tr.modifiers = MapLeftShiftMask;
862 DEBUG_KBD(("Sending guessed scancode 0x%x\n", tr.scancode));
870 return tr;
899 key_translation tr, *ptr;
900 tr = xkeymap_translate_key(keysym, keycode, state);
902 if (tr.seq_keysym == 0)
905 if (tr.scancode == 0)
908 save_remote_modifiers(tr.scancode);
909 ensure_remote_modifiers(ev_time, tr);
910 rdp_send_scancode(ev_time, pressed ? RDP_KEYPRESS : RDP_KEYRELEASE, tr.scancode);
911 restore_remote_modifiers(ev_time, tr.scancode);
918 ptr = &tr;
994 ensure_remote_modifiers(uint32 ev_time, key_translation tr)
997 if (is_modifier(tr.scancode))
1003 if (MASK_HAS_BITS(tr.modifiers, MapNumLockMask)
1009 if (MASK_HAS_BITS(tr.modifiers, MapNumLockMask))
1028 if (MASK_HAS_BITS(tr.modifiers, MapShiftMask)
1032 if (MASK_HAS_BITS(tr.modifiers, MapLeftShiftMask))
1037 else if (MASK_HAS_BITS(tr.modifiers, MapRightShiftMask))
1055 if (MASK_HAS_BITS(tr.modifiers, MapAltGrMask)
1059 if (MASK_HAS_BITS(tr.modifiers, MapAltGrMask))