5

I have a USB RFID reader which acts as a HID - pretending to be a keyboard. If a card/tag gets close it 'types' 01234567890\n (ie. the tag's code followed by a newline) straight into the active application, as any keyboard should.

I can capture the output from this device easily by tailing /dev/ttys000, but Mac OS X still writes those characters to the foremost application.

Is there any way to exclusively capture that tty or otherways disable the device in the UI, so that I can have my RFID reader output routed only to my scripts?

Bonus brownie points if you have code that can create the exclusive lock programatically, rather than installing additional software to route the keyboard.

JP.
  • 151
  • 4
  • 1
    This will probably require an OSX-specific solution, so apple.stackexchange.com might be a better place to post. – Barmar Sep 10 '15 at 00:38
  • Good idea. I know it's frowned upon, but I've cross posted there, and I'll keep this question up to date with any progress. http://apple.stackexchange.com/questions/205085/route-keyboard-through-only-dev-ttys000-on-mac-os-x – JP. Sep 10 '15 at 07:01
  • It's generally preferred to flag your question for migration. – Barmar Sep 10 '15 at 14:56

0 Answers0