bind multiple keys to same action
This commit is contained in:
parent
fa3b6fe37c
commit
a30c628a29
8 changed files with 514 additions and 452 deletions
|
|
@ -112,3 +112,22 @@ String getKeyName(int key, bool emptyNone) {
|
|||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
String getMultiKeysName(const int* keys, int keyCount, bool emptyNone) {
|
||||
String ret;
|
||||
for (int i=0; i<keyCount; i++) {
|
||||
if (keys[i]==0) continue;
|
||||
if (!ret.empty()) ret+=", ";
|
||||
ret+=getKeyName(keys[i]);
|
||||
}
|
||||
|
||||
if (ret.empty()) {
|
||||
if (emptyNone) {
|
||||
return "";
|
||||
} else {
|
||||
return _("<nothing>");
|
||||
}
|
||||
} else {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue