hid

Need to intercept HID Keyboard events (and then block them)

旧城冷巷雨未停 提交于 2019-11-29 22:27:31
I've got a RFID USB device that registers as a HID device (A USB Keyboard more or less). I'm looking for a way to capture this input, and block/filter it before it hits the normal keyboard event handler (and outputs the 10 digit RFID code to the console). I would of course have to exclusively capture just this device, and leave the real keyboard input alone (or pass it along). My initial idea was to block the device in UDEV (So the usbhid/event/kbd kernel module didn't bind to it) and write my own basic driver for this device - but I don't know where to begin, or if that'll even work. What

Making a Windows Mobile device emulate a Bluetooth HID device

匆匆过客 提交于 2019-11-29 15:47:38
问题 I'm looking for a way to connect a Windows Mobile device to a PC via Bluetooth and have it show up on the PC as a HID device (i.e. Keyboard or Mouse). I imagine this would mostly be a matter of modifying the available Bluetooth profiles on the Windows Mobile device so that it exposes a Bluetooth HID interface... Is that even possible? Would it require a custom driver or something on the WinMo device?? For the most part, my main requirement is that it not require ANY special software on the PC

WDK (Windows Driver Kit) and VC++ headers problem

馋奶兔 提交于 2019-11-29 10:19:16
问题 I'm trying to read from an USB HID device, I know how to do it in C# using DLLImport hid.dll, but I want to do it from C++, this way I don't have to declare all the structures, etc, and just include the headers files. So I downloaded the WDK and then when including the headers files and linking the libraries I'm getting a lot of errors: #include <windows.h> extern "C" { #include <hidsdi.h> } int main(){ } Errors (6 out of 163): Error 1 error C2065: 'PASSIVE_LEVEL' : undeclared identifier c:

OSX HID Filter for Secondary Keyboard?

ε祈祈猫儿з 提交于 2019-11-29 06:59:31
I would like to filter keyboard input on a second keyboard, and prevent the key events for that second keyboard from reaching the OS (handle them myself). How can this be done? It can be done by using IOKit and the HIDManager class. If exclusive access to the keyboard is desired, the kIOHIDOptionsTypeSeizeDevice option can be used, but the program will have to be run with root privileges. A stub of the code required to obtain this result is shown below: // Create a manager instance IOHIDManagerRef manager = IOHIDManagerCreate(kCFAllocatorDefault, kIOHIDManagerOptionNone); if (CFGetTypeID

How can I get a String from HID device in Python with evdev?

笑着哭i 提交于 2019-11-29 04:47:55
I am new to python but have experience with HID devices and evdev. I have a 2D barcode scanner which interfaces as HID device. The goal is to get the string from a QR code. I am able to recognize the scanner in Linux and even found its location in /dev/input. I found evdev and have implemented the example below with my scanner. This is just the default code on their site. It reads the values but it prints long event codes with downs and ups. I can't see an easy way to turn this into string. All I want to do is read in a string from the HID scanner in Python. Any help or direction would be

How to talk to a Bluetooth keyboard?

谁说胖子不能爱 提交于 2019-11-28 20:56:44
I've written an Android app that connects to a Bluetooth keyboard. It connects through a BT socket to the keyboard and acquires the socket's input stream. InputStream inStrm = socket.getInputStream(); Next I tried to read the input stream, but it says there are no bytes available. int nBytesAvail = inStrm.available(); // always gives me 0 Or int dataByte = inStrm.read(); // always generates IOException The exception says: Software caused connection to abort If I try to write to the stream, I get another exception: Transport endpoint is not connected. One of two things can be happening. My

How to get graphic tablet pen pressure value?

依然范特西╮ 提交于 2019-11-28 19:58:01
I'm using a Wacom Bamboo Pen tablet and I'd like to be able to get its pen pressure value in my application written in C#. How do I do that? Is there maybe an API that allows one to get pen values on Windows 7? Wacom provides an extensive API to get data directly from the tablet.The API includes example code for detecting pressure, tilt and other interactions: Tilt Test : Demonstrates pressure, use of the eraser and pen tilt properties Pressure Test : Demonstrates how to detect and display pen pressure These code samples are in C, but there are also examples that in c#.net that include code to

List of hex keyboard scan codes and USB HID keyboard documentation

心不动则不痛 提交于 2019-11-28 18:25:10
Where am I able to find a list of the hex keyboard scan codes for different keyboard layouts? I'm sending the key codes over a (fake) USB HID keyboard with the bash command echo -ne followed by the escaped hex key scan code and the HID device: echo -ne "\x00\x00\x00\x38\x00\x00\x00\x00" > /dev/hidg0 echo -ne "\x00\x00\x00\x00\x00\x00\x00\x00" > /dev/hidg0 for a slash ( / ) on the US keyboard layout. On my keyboard layout (CH) it is echo -ne "\x00\x00\x00\x24\x00\x00\x00\x00" > /dev/hidg0 echo -ne "\x00\x00\x00\x00\x00\x00\x00\x00" > /dev/hidg0 for a slash. So I guess there has to exist a list

.NET API for HID (USB)? [closed]

江枫思渺然 提交于 2019-11-28 17:32:05
Is there an API in .NET (C#) for using USB HID (Human Interface) devices? HidLibrary wraps up all the P/Invoke calls for you. But no it doesn't look there is any nice framework APIs for dealing with USB devices. Here's mine little lib for dealing with HIDs. Might be useful especially when you are trying to communicate using raw HID reports. I've also included a simple demonstration of how to use it. There's nothing direct or high-level. There are some things you can do through the managed WMI API, but I've personally found a lot of WMI interaction with hardware to be cryptic at best and

Is it possible to make a computer behave as a bluetooth HID device?

核能气质少年 提交于 2019-11-28 16:23:36
Is it possible to make a computer behave as a bluetooth HID device? That is, given a local machine with a standard USB keyboard plugged into it, other devices could discover this machine and use it as a bluetooth keyboard. I'd like to create a linux or OS X application (or use an existing one, though I've found none) which can behave as described above, but I'm not sure where to start, or if it's even possible. So: Is what I'm describing possible? Are there any existing applications that do what I describe? If no application already exists (I'm assuming not), are there bluetooth libraries or