-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Common Mouse Shortcut Keys to the Tool #63
Comments
The IMPS/2 protocol supports 5 mouse buttons, so previous page and next page should be mapped to button 4 and 5 and working. More mouse buttons are only implemented by proprietary drivers which I can't support. |
I want to map the "Previous Page" and "Next Page" buttons to "Copy" and "Paste" actions. The ms_db values for these buttons are 0x10 and 0x08, respectively. Thanks. |
I don't know what "Copy" and "Paste" actions are on mouse buttons. Do you mean the mouse button should send a keyboard key? |
Regarding to https://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/translate.pdf the keyboard copy/paste keys don't have PS/2 equivalents. |
I have the following code to detect and handle mouse shortcuts: // Detect and handle mouse shortcuts Paste (Ctrl+V) triggered |
Try this: kb_send_key(KEYBOARD_MODIFIER_LEFTCTRL, true, 0);
kb_send_key(HID_KEY_C, true, 0);
kb_send_key(HID_KEY_C, false, 0);
kb_send_key(KEYBOARD_MODIFIER_LEFTCTRL, false, 0); kb_send_key(KEYBOARD_MODIFIER_LEFTCTRL, true, 0);
kb_send_key(HID_KEY_V, true, 0);
kb_send_key(HID_KEY_V, false, 0);
kb_send_key(KEYBOARD_MODIFIER_LEFTCTRL, false, 0); |
The keys are being sent multiple times each time they are triggered. I'm not sure where to control the number of times they are sent. I am using the ms_send_packet function to send the mouse movements and button states. Thank you for your help. |
You need to set a new boolean true on the first click detection and false on button release and check that for false before sending out key scancodes. |
I'm closing this issue because it became inactive. |
Hi,
We often use shortcut keys on common mice, such as copy, paste, cut, previous page, next page, etc. Would it be possible to add support for these shortcut keys to this tool?
The text was updated successfully, but these errors were encountered: