But some of the negative aspects of custom driver would hold still (administrator rights requirement, user unease), plus there would be some more. " Interception library" seems to offer such option. The driver might also have to be signed by certified authority (I'm not completely sure if this is true, since I haven't looked deeper into the issue).Īnother option would be to use a custom driver that provides a programming interface for me, so I wouldn't have to write my own driver. And the users might feel uncomfortable installing such driver. The manager would require administrator priviliges to install the driver, so that would restrict portability. Also it would have some negative consequences. I walked through some documentation and code samples, and it seemed pretty complicated for my project. Custom device driver: So far I had no experience with writing my own driver for a device.There are two APIs to be considered: Raw Input and keyboard Hooks. When you want to work with keyboard input on Windows, you have basicly two choices: use some custom driver for the device, or use one of the Windows' APIs for working with keyboard input. Simply put, the problem at hand is to decide whether to block a key input based on the device that generated the input in the managing application, and then block it successfully in the running application that has user focus. I came across some managers, that seemed they would do the job, but they were all licensed software. It is possible to combine the two and use both at the same time, but I didn't like that solution very much. " HID macros" doesn't allow application specific hotkey setup. " AutoHotkey" is unable to differentiate between multiple keyboards on its own. First I looked around for existing solutions, but I couldn't find any that would meet all my requirements. The hotkeys should be configured for various applications, so I can have one key to perform an action in one application, and the same key to perform different action in another application. Basic idea was to have a standard keyboard for standard input, and one small numeric keyboard that would be used for hotkeys. I had to solve this problem when I wanted to have a custom hotkey manager for multiple keyboards. The article will assume some knowledge of the Windows programming, but I will try to point you to relevant resources, so you should be able to learn everything you need. Therefore I decided to write this article, to make it easier for you, if you ever happen to ask the same question. When I encountered this problem, I had some troubles finding the answer and solution. Let's say you have Notepad opened, when you press " a" key on the keyboard 1, you want the " a" letter to be written into the document, but when you press the " a" key on the keyboard 2, you want some task to be performed in the background, and Notepad not even notice the keystroke. When you delve deeper into the multiple keyboard setup, you might find yourself asking a question, "Can I block the key input for running application based on what keyboard was used to generate it?". Perhaps you could use one for standard typing, and the other one for some special tasks. When you connect more than one keyboard to your pc, you might get some interesting ideas what to do with them. Download HookingRawInputDemo.zip - 29.9 KB.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |