Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Better key prompt for single-key generator #2
The dropdown is not a very pleasant way of picking which key to use. But it's not at all difficult to create a convenient key-picking interface. I suggest letting the user click on a button that will take the next pressed key and use it as the bind. You'd need to store data for which scancodes correspond to specially named keys in the source engine, but this would also allow you to conveniently let the user bind any key on his keyboard without using a massive dropdown.
I am working on this feature right now on the dev branch. Here is what I have so far, let me know what you think...
When you click 'Select Key' button, it activates the browser's PointerLock functionality (to disable mouse input temporarily) and starts listening for any key press.
Also, I have left the drop-down menu there as well and the two controls are kept in sync; you can choose a 'Key to Bind' with either the