USB to Unique Port for RFID keystrokes - vb.net

This is my first time posting here. I hope you can help me with this guys.
I am trying to use a Generic RFID USB hardware (R10D-USB)in my VB .Net project.
Problem:
It seems that this RFID-USB hardware looks like it is being read by my computer as a Keyboard device. It is producing Keystrokes.
In Device Manager, it is being known as
Keyboards
----- HID Keyboard Device
also as
Universal Serial Bus Controllers
----- USB Composite Device
Now, whenever I tap an RFID in the RFID Reader. It produces Keystrokes like Keyboard.
It is typing literally as if your typing on your keyboard. So Whenever I tap an RFID to the RFID reader it would write something even in Notepad.
Concern:
What I am looking for is, is there a way I can sort of like assign it to a Port and only works unless it is being read by my VB form.
in other words, it would stop acting like a keyboard and be disabled to all other programs and activities except the program that I will make to catch all of its Keystrokes (can work on background).

Related

VB.Net Check for keyboard device

I've been looking around for a way to detect if I have a physical keyboard attached to my computer from vb.net but can't find anything. The problem is all googled results returned think what I mean is detecting a keyboard input (AKA: keystrokes). But I want to know if there is a physical keyboard attached. I have also looked into listing USB devices but realize that not all computers (take notebooks for instance) use USB keyboards.
How can I check if a keyboard is attached/operational from VB.net?

Arduino as HID device on Windows - Bind external button presses to a keymap in the OS?

Here's the problem: I want to press an external button attached to an Arduino, and I want that button press to translate into Windows as a keystroke.
My question is, is there a programmable device (I already own an Arduino) that can receive signals, and send them over USB to my computer which will understand it as a keypressExample: Button press acts like hitting the S key on my keyboard?
There are three (four) possibilities:
First Get an Arduino Leonardo (32U4 architecture) - there are HID drivers (so windows recognizes the hardware - short explanation: The Arduino LEONARDO is an integrated USB HID Arduino board. Ideal for projects requiring the board to behave (act) as a USB human interface devices = HID).
Two Use any other Arduino and install Processing with the relevant modules. Write code on both and use Processing to translate to windows.
Three I've seen some more or less working implementations.Example 1Example 2Example 3 Scroll down and you will see a picture of your button solution including code.
(Four) This requires also windows programming skills. Write an usb "driver" a translating engine for I/O between Arduino on usb and acting like a virtual (e.g. touch screen) keyboard. Thats the hardest way to go.

Catch/hook events from specific USB keyboard

I have 2 USB HID keyboards. They have different VID and PID's.
Now I want, in VB.NET, set up a system global hook when my application starts, so it only "Catch" events from one of the keyboards.
Eg, if I open notepad, and enter things on Keyboard1, with VID 04F3 and PID 0103, I want it to show up in notepad as normal, and my application should ignore the inputs. Best for performance is that my application does not even need to pass on the events.
But if I enter things on Keyboard2, with VID 13BA and PID 0018, I want the inputs from that keyboard to be "sucked up" by my application running as a service. Nothing should show up in notepad. My application will instead react based on the input from Keyboard2.
Any ideas on how this can be accomplished?
You usually can hook the keyboard events by injecting a filter driver upon Kbdclass driver as described in the following link.
http://msdn.microsoft.com/en-us/library/windows/hardware/jj128406(v=vs.85).aspx
The report format is described as KEYBOARD_INPUT_DATA.
If you want only to hook certain USB keyboard, you have to inject the filter driver between HIDclass and HID transport(hidusb.sys). HID transport driver reports the keyboard event in the form of HID input report and it varies among the indivisual keyboard. So it's theoritically possible to hook/block the keyboard inputs by the filter driver which located upon hidusb.sys.
However, you have to know or do reverse-engineering of the format of input reports that the keyboard you're interested reports on every key inputs.

how to use serial communication to change the slides of powerpoint presentation?

I have an arduino uno kit. I 'll be giving it signals .These signals should be able to navigate the slides of powerpoint. Also these signals will be coming thru the serial port .
hence is there any software which allows me directly to do the required slide change ?Or should i be writing a code for the same ? If so in which language as iam quite new to this type of stuffs!
This is basically the same question as this one: What is the best way to access a serial port from VBA?
The answer refers to here: http://www.thescarms.com/vbasic/commio.aspx
One possibility would be to have the arduino emulate the serial mouse protocol and send mouse clicks for the Powerpoint navigation (just like pressing the mouse button to go to the next or previous slide). The problem is that as far as I know there are no serial mouse emulation libraries for Arduino, but I could be wrong.
Another option would be use use the LUFA USB library to have your UNO emulate a USB mouse. The problem with this option is that while LUFA is compatible with the UNO hardware, you need to reflash the firmware. And I believe you can't program it with the arduino IDE.
The easiest option would be to not use the UNO but get a Leonardo or a Teensy both can act as a USB Mouse device and can be programmed with the Arduino IDE.
The hardest part would be reading the serial data coming in and ensuring that it's valid. Then, depending on what command you receive (next slide, previous slide, etc.), send simulated mouse clicks or keyboard presses to PowerPoint. Better yet, you could just use the PowerPoint COM interface.

Controlling USB keyboard and mouse

We have a hardware device, with an LCD display. It supports an USB interface to connect keyboard and mose. Using these keyboard and mouse, we can navigate to varios menu items and edit entries.
We have couple of test cases written to verify that mouse click and keyboard input events are working when pressed respective key.
My task is to automate these test cases.
I donot have any control to the hardware device, as I can not access the o/s kernel or any application running there. There is one way to verify what is currently displayed on the UI. So I have to use that and verify whether the mouse/keyboard has performed the appropriate events.
As I have gone through couple of previous posts, it seems like that one of the way to achieve this is through virual HID device driver rather than actual keyboard and mosue. But I am not sure how to achieve it.
Please do help me for it. I am fine with any programming language.
I am more interested to simulate the mouse and keyboard events.
You probably don't need to write your own driver. AutoHotKey does pretty much anything you can think of, and the scripting language is quite easy to learn.
You can get it here:
http://www.autohotkey.com/
Since you're using linux, here's a similar project that will run on linux:
http://sikuli.org/