[DEV] add interface to update the special char with input chars
This commit is contained in:
parent
0f6ed06350
commit
b6feeb382f
@ -17,11 +17,42 @@
|
||||
#define EWOL_FLAG_KEY_NUM_LOCK 0x00000040
|
||||
#define EWOL_FLAG_KEY_INSERT 0x00000080
|
||||
|
||||
// TODO : Update to support the Left and right of some key ...
|
||||
|
||||
ewol::key::Special::Special(void) :
|
||||
m_value(0) {
|
||||
|
||||
}
|
||||
void ewol::key::Special::update(enum ewol::key::keyboard _move, bool _isDown) {
|
||||
switch (move) {
|
||||
case keyboardInsert:
|
||||
setInsert(_isDown);
|
||||
break;
|
||||
case keyboardCapLock:
|
||||
setCapsLock(_isDown);
|
||||
break;
|
||||
case keyboardShiftLeft:
|
||||
case keyboardShiftRight:
|
||||
setShift(_isDown);
|
||||
break;
|
||||
case keyboardCtrlLeft:
|
||||
case keyboardCtrlRight
|
||||
setCtrl(_isDown);
|
||||
break;
|
||||
case keyboardMetaLeft:
|
||||
case keyboardMetaRight:
|
||||
setMeta(_isDown);
|
||||
break;
|
||||
case keyboardAlt:
|
||||
setAlt(_isDown);
|
||||
break;
|
||||
case keyboardAltGr:
|
||||
setAltGr(_isDown);
|
||||
break;
|
||||
case keyboardNumLock:
|
||||
setNumLock(_isDown);
|
||||
break;
|
||||
}
|
||||
|
||||
bool ewol::key::Special::getCapsLock(void) const {
|
||||
if ((m_value & EWOL_FLAG_KEY_CAPS_LOCK) != 0) {
|
||||
|
@ -105,6 +105,12 @@ namespace ewol {
|
||||
* @param[in] _value The new Insert value
|
||||
*/
|
||||
void setInsert(bool _value);
|
||||
/**
|
||||
* @brief Update the internal value with the input moving key.
|
||||
* @param[in] _move Moving key.
|
||||
* @param[in] _isFown The Key is pressed or not.
|
||||
*/
|
||||
void update(enum ewol::key::keyboard _move, bool _isDown);
|
||||
};
|
||||
etk::CCout& operator <<(etk::CCout& _os, const ewol::key::Special _obj);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user