Closed hryamzik closed 8 years ago
Perfect, thanks!
Looks like it would be nice to put key mappings and version/pin setup outside the repository, I'll take a look if it's possible. I've also managed to add some hot keys like PTT for skype:
else if ((key_byte & MAP_MASK) == 0b01001010)
// special case the Memo key, skype PTT and skype mute with fn pressed
{
if (!fn_key_down)
{
if (PPK_DEBUG) Serial.print("Memo key down: ") && Serial.println(!key_up);
if (key_up)
{
Keyboard.release(KEY_UP_ARROW);
Keyboard.release(KEY_LEFT_CTRL);
Keyboard.release(KEY_LEFT_ALT);
Keyboard.release(KEY_LEFT_GUI);
}
else
{
Keyboard.press(KEY_LEFT_GUI);
Keyboard.press(KEY_LEFT_ALT);
Keyboard.press(KEY_LEFT_CTRL);
Keyboard.press(KEY_UP_ARROW);
}
}
But hardcoding them is definitely a quick and dirty solution, some array-styled key-mapping should be used instead.
For the sake of simplicity, I'm not particularly interested in adding a separate file for keycode assignments and configuration, or adding a more complicated data structure for allowing multiple keycodes/macro style definitions to single key presses. I'll see if I can find a nice solution.
I merged in the escape and F keys changes, and the undefined keypresses code, which inspired me to revise/develop/clean up the debug printing more comprehensively. The ~ thing seemed less critical to me, since there's a ~ key on the keyboard already.
Thanks!