11

Get yourself a Arduino Leonardo, Micro or Pro Micro (or Due, Zero, M0). Those can emulate a keyboard. Start with reading the Arduino Keyboard Mouse reference. The Arduino Nano can not use the Arduino Keyboard Mouse library. Since many years, there is a library called "V-USB" that requires some extra hardware and makes it possible for a ATmega328p ...


6

If indeed the descriptor is the problem then yes you can change it. In the core file USBCore.h is the line: #define D_CONFIG(_totalLength,_interfaces) \ { 9, 2, _totalLength,_interfaces, 1, 0, USB_CONFIG_BUS_POWERED | USB_CONFIG_REMOTE_WAKEUP, USB_CONFIG_POWER_MA(500) } Just change the 500 to something smaller (it has to be an even number). However ...


5

The Arduino assumes a US keyboard layout. The thing with keyboards is they don't actually send the letters or symbols that are printed on the keys. Instead the send a scan code that defines where on the keyboard the key is. It is then up to the computer to convert those scan codes into actual letters and symbols, and that is performed by the keyboard ...


5

They Keyboard.press() command accept modifiers per the documentation. You may need to do multiple press() commands before releasing. For example, if you want to launch File Explorer you could use: Keyboard.press(KEY_LEFT_GUI); Keyboard.press('e'); Keyboard.releaseAll(); This is equivalent to shortcut keys Win + E. The modifier GUI is what stands in for ...


4

You can't just "print" a key like that. You use print for sending text. When you use println it sends an enter key along with your text, so you can do : Keyboard.println("ls -al"); and it will send the text ls -al and press enter for you. If you want to do it in the 'raw' way you will need to press and then release the key: Keyboard.press(KEY_ENTER); ...


4

If you have Arduino/Genuino Uno selected as your board in the Tools ► Board ► menu, then you get the error. If you select Arduino Leonardo it compiles correctly. From Can't seem to be able use Keyboard.h library, this post states: Keyboard.h (and Mouse.h) only works on devices that use the ATmega32u4 processor, like the Leonardo or Micro. See: https://...


4

Download Device Class Definition for Human Interface Devices (HID) https://www.usb.org/sites/default/files/documents/hid1_11.pdf See section 6.2.1 HID Descriptor bCountryCode 0x09 German also see section E.4 (page 67) E.4 HID Descriptor (Keyboard) Part Offset/Size Description Sample (...


3

You have to do some tweaks to the usbkeyboard libraries that comes with the IDE. For a video tutorial, take a look at this: Arduino Leonardo as a multimedia keyboard Which uses the information from this site, if you prefer text only: Arduino Leonardo multimedia keys The Leonardo and ProMicro both use the ATMega32u4 and should both work with theses ...


3

Not without extra software on your computer side. However if you use Arduino Micro, you can emulate keyboard and/or mouse directly.


3

USB is deceptively simple. The underlying protocol is very complex. So a complete answer to your question requires some USB background. USB is divided into 2 types. USB Hosts and USB Devices. We are not concerned about USB Hosts here. USB Devices only need to know about their own functions / features. If they are a serial port device, like the FTDI chip ...


3

My 2002-era Mac keyboard doesn't work, That doesn't surprise me - modern Macs have never needed PS/2 support. none of my 5 wireless keyboards work, That's because they're not keyboards, they're wireless transceivers that provide USB HID interfaces. and neither do Xbox or foldable keyboards. Too modern, and of course XBox has never needed PS/2 ...


3

Many USB keyboards (certainly older ones, though almost certainly not wireless ones) are also PS/2 keyboards. The wiring of the cable is all that differs, and the chip in the keyboard changes its behaviour depending on how it's wired. A simple USB to PS/2 adaptor is merely a USB socket and PS/2 plug wired together in a certain way: So that's: 5V to 5V D- ...


3

The power consumption is part of the exchange with the PC when it is plugged in. You can change that. Find the file USBCore.h in your Arduino install directory. In my case (under Linux) it was: ./hardware/arduino/avr/cores/arduino/USBCore.h Inside that file, at around line 269 (depending on the distribution) you should see these lines: #define D_CONFIG(...


3

No. There is no such facility. If you take a German keyboard and plug it into a US configured computer the key layout will be wrong. You have to tell the computer that you're using a German keyboard. Keyboards don't know what is printed on the keycaps. All they understand is where the buttons are physically located. The same with the Arduino. It's sending ...


3

The STM32F105xx series is not yet supported by either Arduino core (STM32 core or maple core) and neither mbed-os. The chip is still usable with the STM32 provided framework, the STM32HAL, (e.g. through STM32CubeMX). There you can select your chip and generate a template project. The program lets you easily configure the chip for "USB Device" role and HID (...


2

In the comments on SparkFun's product page for RN-42, gskelly indicates there is a flag in the v6.15 firmware that allows you to switch back and forth easily: Actually, since this includes the v6.15 firmware, you don’t need to re-flash the module to switch between HID and SPP. It can now be done using AT commands as follows: S~,6 // Enable HID on ...


2

I should be able to set and use the HID profile (from the default SPP) Unfortunately, your assumption is incorrect. From the same documentation you quoted, the previous sentence says: To use Roving Networks’ Bluetooth HID profile, you must use a special build of firmware, version 6.03 or later. Poorly phrased, this does mean that you need to have two ...


2

So it might depend on how you implement it. With an Arduino Uno, your options for creating an HID device are limited to either reprogramming the 16u2 (which will require an ISP) or using a software USB implementation (like V-USB). If you go with the first method I'm pretty sure that will work as it will be a native USB connection. As for the second method, I'...


2

Let me try to help. This isn't a definitive "answer" but I need to post screenshots etc., so I am making it an answer. I tried your code with my Arduino Micro. I believe it is the same as the Leonardo except for a byte difference in the bootloader identification (for the USB device). First the good bad news. It worked under Windows 7. And let me tell you ...


2

First off, consider trying '\032' or '\x1A' for the ctrl-z. (See, eg, How to send ctrl+z in C on stackoverflow.) To send a ctrl-z, use something like: Keyboard.press(ctrlKey); Keyboard.press('z'); delay(100); Keyboard.releaseAll(); For more examples of using modifier keys, see the KeyboardPress page at arduino.cc, and the example program KeyboardLogout....


2

Could you just untick the "Use all F1, F2, …" in System Preferences -> Keyboard? Just wondering if that would be an option and if doing so would create the desired outcome.


2

Yes, it is perfectly possible. You ideally need an Arduino with a direct USB interface, such as the Leonardo. Then you can just access the Keyboard object to send the keystrokes to the PC. How your receive the data through Ethernet is entirely up to you. A simple TCP interface may be easiest - open the connection with whatever telnet-like client and ...


2

No. That chip can only act as a USB-UART bridge. You could use V-USB to turn the ATmega328P into a low-speed USB device, but the Arduino IDE has no support for that.


2

You could hack it. Make it press CMD+SPACE type terminal.app press ENTER type echo -e "\xC2\xAF\\_(\xE3\x83\x84)_/\xC2\xAF" | pbcopy press ENTER press CMD+Q press CMD+V though the user would see a terminal window for a second.


2

https://digistump.com/wiki/digispark/tutorials/connectingpro It is suggested that in order to upload using the Arduino IDE you must: Add the repository http://digistump.com/package_digistump_index.json in Preferences > Additional Boards Manager URLs Install Digistump from the boards manager. select the DigiSpark in Tools > Boards. Then this is perhaps the ...


2

You can edit the file scancode-ascii-table.h in your DigiKeyboard library. It basically states which ASCII code corresponds to which keyboard scancode. So if you try to print the ':' character but get a '>' instead, you know that in the above mentioned file at the ASCII position for ':' is the scancode for a '>'. Using this, you can swap the scancodes ...


2

As suggested in the comments, you have two options: As suggested by Majenko, you can use the Arduino USB Host Shield: Alternatively you could use a PS2 keyboard instead (as suggested by Gerben). Arduino already has a library to handle PS2 keyboards, so the implementation of it would be easy. For reference (and example program) playground.arduino.cc/Main/...


2

I am able to use this library: https://github.com/techpaul/PS2KeyAdvanced and USB's data +/- connected to pins 2+3 of an arduino to read keys on standard keyboards. keyboard.begin( 3, 2); // D3= data+, D2= data- A standard keyboard is one which doesn't need a driver to work on any computer. I'd tried several libraries, serial keyboard adapters, and ps2/usb ...


2

As per my understanding, the mouse has a microcontroller and a TTL serial converter which is programmed a certain way that enable computer's default mouse driver to understand the instructions coming from the connected device. No, the mouse's microcontroller is a USB device. Like arduino send serial instructions to a port say COM3 and the driver which is ...


2

[Completely rewritten answer] That seems fun. But why 65 keys ? with 64 keys it is easier. You have to test the sensitivity of the hall switches with the magnets to know how far apart the keys must be. Perhaps they only work with strong magnets or perhaps a number of them are activated when the glove is near. With hall switches, there are 65 digital ...


Only top voted, non community-wiki answers of a minimum length are eligible