mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-06 01:08:25 +01:00
Removed support for key mapping in Keyboard.
Was no longer being used and would be damn near impossible to support with the new scheme for handling modifiers and non-printing keyboard characters.
This commit is contained in:
parent
db82ab90eb
commit
aec3752e52
@ -253,7 +253,7 @@ bool Mouse_::isPressed(uint8_t b)
|
|||||||
//================================================================================
|
//================================================================================
|
||||||
// Keyboard
|
// Keyboard
|
||||||
|
|
||||||
Keyboard_::Keyboard_() : _keyMap(0)
|
Keyboard_::Keyboard_()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -262,11 +262,6 @@ void Keyboard_::sendReport(KeyReport* keys)
|
|||||||
HID_SendReport(2,keys,sizeof(KeyReport));
|
HID_SendReport(2,keys,sizeof(KeyReport));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Keyboard_::setKeyMap(KeyMap* keyMap)
|
|
||||||
{
|
|
||||||
_keyMap = keyMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
extern
|
extern
|
||||||
const uint8_t _asciimap[128] PROGMEM;
|
const uint8_t _asciimap[128] PROGMEM;
|
||||||
|
|
||||||
|
@ -87,22 +87,11 @@ typedef struct
|
|||||||
uint8_t keys[6];
|
uint8_t keys[6];
|
||||||
} KeyReport;
|
} KeyReport;
|
||||||
|
|
||||||
// Map a character into a key report
|
|
||||||
// Called from Print to map text to keycodes
|
|
||||||
class KeyMap
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual void charToKey(int c, KeyReport* keyReport) = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
//
|
|
||||||
class Keyboard_ : public Print
|
class Keyboard_ : public Print
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
KeyMap* _keyMap;
|
|
||||||
KeyReport _keyReport;
|
KeyReport _keyReport;
|
||||||
void sendReport(KeyReport* keys);
|
void sendReport(KeyReport* keys);
|
||||||
void setKeyMap(KeyMap* keyMap);
|
|
||||||
public:
|
public:
|
||||||
Keyboard_();
|
Keyboard_();
|
||||||
virtual size_t write(uint8_t k) {return type(k);};
|
virtual size_t write(uint8_t k) {return type(k);};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user