input-devices

Android 3.0 Use Physical Keyboard Setting

限于喜欢 提交于 2020-01-15 08:08:24
问题 Background: I recently purchased a Motorola XOOM Tablet along with the Desktop Dock and Bluetooth Keyboard accessories. The dock and keyboard work great, but when I take the tablet off the dock to move away from my desk, the keyboard still remains paired with the device and I have to manually change the settings to use the soft keyboard. The same goes for when I set it back on the dock, I need to manually switch it back. It's not a huge problem, but it would be nice not to have to think about

MacOS Virtual Input Devices

和自甴很熟 提交于 2019-12-10 10:54:54
问题 How can I create a virtual HID device in code? I'm trying to avoid writing a kernel extension to accomplish this, but it seems to be the only way. I need to be able to create virtual HID devices of all types, and have an app running in the background feed them events. Is there a way to do this in user-space, or must I venture into kernel land? 回答1: The typical way of creating HID devices is to use the IOHID* classes in IOKit. You can write a userclient that passes events in and out. I'm not

MacOS Virtual Input Devices

风格不统一 提交于 2019-12-06 05:13:32
How can I create a virtual HID device in code? I'm trying to avoid writing a kernel extension to accomplish this, but it seems to be the only way. I need to be able to create virtual HID devices of all types, and have an app running in the background feed them events. Is there a way to do this in user-space, or must I venture into kernel land? The typical way of creating HID devices is to use the IOHID* classes in IOKit. You can write a userclient that passes events in and out. I'm not sure what a "virtual" HID device is, however, I guess. If you want to create a keyboard on the screen, that

Connection to specific HID profile bluetooth device

十年热恋 提交于 2019-12-03 21:48:58
问题 I connect bluetooth barcode scanner to my android tablet. barcode scanner is bonded with android device as a input device - HID profile. it shows as keyboard or mouse in system bluetooth manager. i discovered that bluetooth profile input device class exist but is hidden. class and btprofile constants have @hide annotaions in android docs. hidden class: http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.3.1_r1/android/bluetooth/BluetoothInputDevice.java here

How can you take ownership of a hid device?

女生的网名这么多〃 提交于 2019-12-03 03:47:51
问题 What I would like to take ownership of a hid device that may already have been plugged in, consume it's output, while preventing others(X11 or terminal) from consuming it. If I can help it, I don't want to pretend to be a terminal, but rather to monopolize a particular hid or character device. The idea is that some hid devices may be recognized as mice/keyboards by x/terminal, but a second mouse or keyboard could be used for something else, but to do that you need to make sure they aren't

Connection to specific HID profile bluetooth device

为君一笑 提交于 2019-12-01 00:21:38
I connect bluetooth barcode scanner to my android tablet. barcode scanner is bonded with android device as a input device - HID profile. it shows as keyboard or mouse in system bluetooth manager. i discovered that bluetooth profile input device class exist but is hidden. class and btprofile constants have @hide annotaions in android docs. hidden class: http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.3.1_r1/android/bluetooth/BluetoothInputDevice.java here they should be also 3 other constants developer.android.com/reference/android/bluetooth

Make a USB Device, Control It In Java

穿精又带淫゛_ 提交于 2019-11-30 08:30:18
I'm thinking about making a physical controller (device?) with knobs, buttons, and LEDs. I'd like to interact with it using Java (respond to the knobs, light up LEDs, etc). The reason I mention Java is two-fold: first, I know Java well 1 . Second, I've written the rest of the program I need to interface with in Java (though there are ways to talk to the Java program from another language). I would like the device to connect via USB and be (computer-)platform independent. I haven't the slightest idea of where to start, except to start reading the Arduino website. Is this my best/only option? Is

Make a USB Device, Control It In Java

会有一股神秘感。 提交于 2019-11-29 11:54:33
问题 I'm thinking about making a physical controller (device?) with knobs, buttons, and LEDs. I'd like to interact with it using Java (respond to the knobs, light up LEDs, etc). The reason I mention Java is two-fold: first, I know Java well 1 . Second, I've written the rest of the program I need to interface with in Java (though there are ways to talk to the Java program from another language). I would like the device to connect via USB and be (computer-)platform independent. I haven't the

JavaScript: Check if mouse button down?

走远了吗. 提交于 2019-11-26 12:07:44
Is there a way to detect if a mouse button is currently down in JavaScript? I know about the "mousedown" event, but that's not what I need. Some time AFTER the mouse button is pressed, I want to be able to detect if it is still pressed down. Is this possible? Eugene Lazutkin Regarding Pax' solution: it doesn't work if user clicks more than one button intentionally or accidentally. Don't ask me how I know :-(. The correct code should be like that: var mouseDown = 0; document.body.onmousedown = function() { ++mouseDown; } document.body.onmouseup = function() { --mouseDown; } With the test like

JavaScript: Check if mouse button down?

放肆的年华 提交于 2019-11-26 02:30:40
问题 Is there a way to detect if a mouse button is currently down in JavaScript? I know about the \"mousedown\" event, but that\'s not what I need. Some time AFTER the mouse button is pressed, I want to be able to detect if it is still pressed down. Is this possible? 回答1: Regarding Pax' solution: it doesn't work if user clicks more than one button intentionally or accidentally. Don't ask me how I know :-(. The correct code should be like that: var mouseDown = 0; document.body.onmousedown =