hid

Using HIDController on Delphi 2010

别等时光非礼了梦想. 提交于 2019-11-28 09:37:47
问题 I have an application that uses HID Controller on delphi 7 but now I need to use it on Delphi 2010(license problems) but I've found some compatibility problems of this HIDController in this delphi 2010. This library is part of Project JEDI. I notice some questions from people using this library(JvHidDeviceController component) with Delphi 2010 and Win7. Maybe someone who faced the same problem could help me. I now its possible I just can't figure how. 回答1: This is working code for D2010: Use

Reading and writing to USB (HID) interrupt endpoints on Mac

廉价感情. 提交于 2019-11-28 05:26:36
I am attempting to communicate with a rather specific USB device and developing both Windows and Mac code to do so. The device is a USB device with a HID interface (class 3) with two endpoints, an interrupt input and an interrupt output. The nature of the device is such that data is sent out from the device on the input endpoint only when data is requested from the host: the host sends it data which the device responds to on its input interrupt endpoint. Getting data to the device (a write) is much more simple... The code for Windows is rather straight-forward: I get a handle to the device and

OSX HID Filter for Secondary Keyboard?

99封情书 提交于 2019-11-28 00:53:07
问题 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? 回答1: 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

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

让人想犯罪 __ 提交于 2019-11-27 18:30:33
问题 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.

How to simulate a low level keypress on os x?

不打扰是莪最后的温柔 提交于 2019-11-27 15:10:37
问题 I am trying to generate keyboard keydown and keyup events programmatically. I am currently using CGPostKeyboardEvent to do this, but I am searching for a way to do this at a lower level. I have looked at DDHidLib but could not figure out a way to create a fake event. Can anyone help? update : Thanks to weichsel's advice I am now creating a key down event with the following: CGEventRef e = CGEventCreateKeyboardEvent (NULL, (CGKeyCode)52, true); CGEventPost(kCGSessionEventTap, e); CFRelease(e);

How to talk to a Bluetooth keyboard?

℡╲_俬逩灬. 提交于 2019-11-27 13:19:52
问题 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

List of hex keyboard scan codes and USB HID keyboard documentation

安稳与你 提交于 2019-11-27 11:33:00
问题 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

Get mouse deltas using Python! (in Linux)

北城余情 提交于 2019-11-27 07:53:52
I know that Linux gives out a 9-bit 2's compliment data out of the /dev/input/mice. I also know that you can get that data via /dev/hidraw0 where hidraw is your USB device giving out raw data from the HID. I know the data sent is the delta of the movement (displacement) rather than position. By the by I can also view gibberish data via the "cat /dev/input/mice". My question is : Can you please tell me by using the Python language how can I read this data? I really rather get that data as in simple integers. But it has proven hard. The real problem is reading the damn data. Is there a way to

C# and USB HID Devices

微笑、不失礼 提交于 2019-11-27 06:56:05
I'm looking for one of either 2 things 1 - A working example of code using Florian's library from: http://www.florian-leitner.de/index.php/2007/08/03/hid-usb-driver-library/ This seems to be one of the better (only???) C#/HID libraries but the author has gone MIA and I can't seem to get a code example to work. The code I have is: { USBHIDDRIVER.USBInterface usb = new USBInterface(myvid,mypid); if (usb.Connect()) MessageBox.Show(”connection!”); else MessageBox.Show(”FAIL”); usb.enableUsbBufferEvent(new System.EventHandler(myEventCacher)); usb.startRead(); } private void myEventCacher(object

Using Android to Communicate with a USB HID Device

ε祈祈猫儿з 提交于 2019-11-27 01:02:10
问题 I am new to USB and to Android so please forgive me if I don't explain myself clearly. I have a USB HID device that I can communicate with in Windows. I am trying to establish communication using an Acer Iconia A500 tablet running Android 3.1. I am able to find the device, enumerate it, get its only available interface, get the only available endpoint (0), and determine what type of endpoint it is (transfer interrupt from device to host). My understanding of the USB spec is that all HID