i am trying to use my Arduino Uno as a HID Keyboard. i saw a youtube video in which the guy uses arduino uno, flashes a keyboard firmware and when pressing a button, the arudino works as a keyboard. i also did the same thing with my arduino uno and everything WORKS FINE BUT the youtube guy provided an image which has keycodes for almost all keys. but i need keycodes for more keys. i cannot find them anywhere that match this guy's image and works for my arudio. i need key codes for volume+, volume-,mute. only three. here is that image :
credit for image and code : Eward Hage
uint8_t buf[8] = { 0 }; //Keyboard report buffer
#define PIN_W 2 // Pin for w
void setup() {
Serial.begin(9600);
pinMode(PIN_W, INPUT);
}
void loop() {
if (digitalRead(PIN_W) == 1) {
buf[2] = 26;
Serial.write(buf, 8);
releaseKey();
delay(100);
}
}
// Function for Key Release
void releaseKey()
{
buf[0] = 0;
buf[2] = 0;
Serial.write(buf, 8); // Send Release key
}