示例#1
0
文件: input.c 项目: BUGgs/FreeRDP
BOOL input_send_keyboard_pause_event(rdpInput* input)
{
	/* In ancient days, pause-down without control sent E1 1D 45 E1 9D C5,
	 * and pause-up sent nothing.  However, reverse engineering mstsc shows
	 * it sending the following sequence:
	 */

	/* Control down (0x1D) */
	if (!input_send_keyboard_event(input, 0,
		RDP_SCANCODE_CODE(RDP_SCANCODE_LCONTROL)))
		return FALSE;

	/* Numlock down (0x45) */
	if (!input_send_keyboard_event(input, 0,
		RDP_SCANCODE_CODE(RDP_SCANCODE_NUMLOCK)))
		return FALSE;

	/* Control up (0x1D) */
	if (!input_send_keyboard_event(input, KBD_FLAGS_RELEASE,
		RDP_SCANCODE_CODE(RDP_SCANCODE_LCONTROL)))
		return FALSE;

	/* Numlock up (0x45) */
	return input_send_keyboard_event(input, KBD_FLAGS_RELEASE,
		RDP_SCANCODE_CODE(RDP_SCANCODE_NUMLOCK));
}
示例#2
0
文件: input.c 项目: AMV007/FreeRDP
void input_send_focus_in_event(rdpInput* input, UINT16 toggleStates)
{
	/* send a tab up like mstsc.exe */
	input_send_keyboard_event(input, KBD_FLAGS_RELEASE, 0x0f);

	/* send the toggle key states */
	input_send_synchronize_event(input, (toggleStates & 0x1F));

	/* send another tab up like mstsc.exe */
	input_send_keyboard_event(input, KBD_FLAGS_RELEASE, 0x0f);
}
示例#3
0
void input_send_focus_in_event(rdpInput* input, UINT16 toggleStates, UINT16 x, UINT16 y)
{
	/* send a tab up like mstsc.exe */
	input_send_keyboard_event(input, KBD_FLAGS_RELEASE, 0x0f);

	/* send the toggle key states */
	input_send_synchronize_event(input, (toggleStates & 0x1F));

	/* send another tab up like mstsc.exe */
	input_send_keyboard_event(input, KBD_FLAGS_RELEASE, 0x0f);

	/* finish with a mouse pointer position like mstsc.exe */
	input_send_extended_mouse_event(input, PTR_FLAGS_MOVE, x, y);
}