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

Safer way to send commands from OptiKey #6

Open
kmcnaught opened this issue Jun 6, 2017 · 0 comments
Open

Safer way to send commands from OptiKey #6

kmcnaught opened this issue Jun 6, 2017 · 0 comments

Comments

@kmcnaught
Copy link
Collaborator

It would be nice to be able to have (custom) commands sent from optikey, for example "/effect @p night_vision". This is a little tricky though because of how minecraft handles key presses. If you send the whole string to minecraft in one go, then the later letters get handled before the "/", i.e. they turn lots of mods on or off instead of opening the command/chat pane. Instead you can send "/" on its own to open the chat pane, and then "effect @p night_vision", but this is a bit dangerous if the user sends the second string without having the chat pane open (since most of those letters have keybindings to mods). You could also hook up a new keybinding for opening the chat, which guarantees it will be handled before the rest of the string, but in this case you lose many characters at the start of the command string.

Needs some thought. The naive approach might be to add new keybindings for a limited set of specific commands, but I'm beginning to run out of available keys...

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

No branches or pull requests

1 participant