Hello, I am currently working on a project which is a keyboard to a computer, I am using two shift registers for 14 columns, consequently I have 8 inputs on an arduino micro. What always repeats in the loop is that I send 1 to one of the columns for a moment, and then just wait on the output 8 pins, where my 1 apears
Now to the software, so far I'm working on defining an output for each key, e.g. when I press A, according to whether I have schift, capslock or whatever pressed, it will send to the computer according to that, e.g. a, A.
But this is probably not how a commonly used keyboard works, normally I can set keys for many languages, there are many keyboard shortcuts that I don't know how to program, e.g. ctrl+A or alt+F4 :D.
My question is, how does a normal keyboard communicate with a PC and how could one make a "normal" keyboard, with an arduino
Keyboard.press(KEY_LEFT_CTRL);
Keyboard.press('A');
delay(10);
Keyboard.releaseAll();
Keyboard.press(KEY_LEFT_ALT);
Keyboard.press('KEY_F4');
delay(10);
Keyboard.releaseAll();
Start with an Arduino that can act as a keyboard, like a Leonardo or Micro.
A 'normal' USB keyboard tells the PC what key has been pressed. The codes for the keys are defined by the USB standard.
[189][166][167][168][169][170][171][172][173][174][175][181][182][178]
[179][156][162][144][157][159][164][160][148][154][155][183][184][185]
[193][140][158][143][145][146][147][149][150][151][187][188][176]
[0x81][165][163][142][161][141][153][152][190][191][192][0x85]
[Ctrl=0x80][Alt=0x81][GUI=0x83][ 180 ][GUI=0x87][Alt=0x86][Ctrl=0x84]
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.