geekhack
geekhack Community => New Members => Topic started by: Rioke on Thu, 01 October 2015, 21:33:54
-
I've just started to browse around GH, hoping to possibly find something to help me with a project of mine, so I though I might as well ask.
I'm hoping to try to use preexisting drivers for a homemade keyboard. Now the trick is, this isn't a normal keyboard. I am using accelerators to detect motion of the fingers and want to have the computer to understand numerical values as different keystrokes. I was hoping to use some kind of code filter to translate the numbers into something the computer would understand, but I need to understand how the drivers work. I was thinking of using the Microsoft Hardware USB Keyboard drivers that are already on Windows computers, but finding anything for Windows is a little trick. Any suggestions?
Also, the main constraint is that it needs to be on the Windows OS :/
-
Maybe start with understanding what a computer understands.
http://www.asciitable.com/
I hope this helps you.
-
What are you using as a controller? If you're using an AVR, maybe just choose one that can do USB HID protocol (ATmega32u4). If not, an AVR may still be your best bet...you can use a Teensy to communicate with your primary controller via serial connection, then interface with the computer via the Teensy's USB HID emulation.
-
@Snowdog
I wouldn't think the computer would be interpreting the numbers like that, especially if I'm trying to trick it into thinking the device is a keyboard.
@njbair
I'm using a Teensy and I don't really have any other option for any other controller since this is what I have at hand. I know there is Teensyduino IDE that allows the Teensy to be used as a keyboard, but I'm trying to see if I can do everything on the computer side so the controller will have less work, mainly for latency.
-
Well if you're going to use existing Windows drivers, your computer needs to think it's hooked up to a keyboard.
There's only one thing I can think of besides using the Teensy's USB HID emulation. And that would be to buy a cheap rubberdome keyboard and steal the controller from it, reverse-engineer the rubberdome matrix, and have the Teensy send the appropriate signals to the rubberdome controller. You would probably need some serial I/O expanders, since the Teensy has a low pin count to begin with, and you're no doubt already using many of them for your input sensing.
Does that make sense?
-
Yeah, that makes sense. If I were to go with that approach, do you have any idea what kind of signal would be going to the keyboard controller? A 3.3V signal?
And I guess I should have mentioned, I would like to try to not add anymore hardware if necessary, but it's starting to look like I might have to.
-
@Snowdog
I wouldn't think the computer would be interpreting the numbers like that, especially if I'm trying to trick it into thinking the device is a keyboard.
No worries, I am on a different planet.
-
Yeah, that makes sense. If I were to go with that approach, do you have any idea what kind of signal would be going to the keyboard controller? A 3.3V signal?
And I guess I should have mentioned, I would like to try to not add anymore hardware if necessary, but it's starting to look like I might have to.
I would honestly try using the Teensy in HID mode first. See if it works. If you do end up needing more hardware, a second Teensy connected via serial would be the easiest because no reverse engineering is necessary.
Either way, the Teensy should have a VCC pin that pushes 5V, since you're using USB as a power source.
-
Welcome to Geekhack!
That sounds an intriguing project.
Not many people browse the new members section, so if you don't get any responses here, please feel free to create a new thread in the making stuff together (https://geekhack.org/index.php?board=117.0) section.
-
Wellcome to GH bruh