Skip to content
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

Modify the key to grab/release keyboard and mouse from the host #27

Open
Shuya4 opened this issue Feb 12, 2022 · 2 comments
Open

Modify the key to grab/release keyboard and mouse from the host #27

Shuya4 opened this issue Feb 12, 2022 · 2 comments

Comments

@Shuya4
Copy link

Shuya4 commented Feb 12, 2022

Just wonder if there is a possibility to change the grab/release shortcut Ctrl + Raspberry to other keys.

@Gadgetoid
Copy link
Owner

The code to handle the shortcut is very, very crude- right now is checks the bitmasked function keys for a particular value:

pi400kb/pi400.c

Lines 225 to 238 in fd8bb80

// Trap Ctrl + Raspberry and toggle capture on/off
if(keyboard_buf.data[0] == 0x09){
if(grabbed) {
ungrab_both();
send_empty_hid_reports_both();
} else {
grab_both();
}
}
// Trap Ctrl + Shift + Raspberry and exit
if(keyboard_buf.data[0] == 0x0b){
running = 0;
break;
}

It's also hard-coded and not very flexible.

What sort of combo where you thinking of?

@DeeNewcum
Copy link
Contributor

This fork might be easier to modify, the shortcut keys aren't hard-coded. You can see the full list of available keycodes here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants