Enable '+', ',', '-', '.' in accelerators.
This commit is contained in:
parent
3259246d17
commit
4a79842c4c
1 changed files with 2 additions and 0 deletions
|
@ -69,6 +69,8 @@ bool StringToAccelerator(const std::string& description,
|
||||||
key = static_cast<ui::KeyboardCode>(ui::VKEY_A + (tokens[i][0] - 'A'));
|
key = static_cast<ui::KeyboardCode>(ui::VKEY_A + (tokens[i][0] - 'A'));
|
||||||
} else if (tokens[i][0] >= '0' && tokens[i][0] <= '9') {
|
} else if (tokens[i][0] >= '0' && tokens[i][0] <= '9') {
|
||||||
key = static_cast<ui::KeyboardCode>(ui::VKEY_0 + (tokens[i][0] - '0'));
|
key = static_cast<ui::KeyboardCode>(ui::VKEY_0 + (tokens[i][0] - '0'));
|
||||||
|
} else if (tokens[i][0] >= '+' && tokens[i][0] <= '.') {
|
||||||
|
key = static_cast<ui::KeyboardCode>(ui::VKEY_OEM_PLUS + (tokens[i][0] - '+'));
|
||||||
} else {
|
} else {
|
||||||
LOG(WARNING) << "Invalid accelerator character: " << tokens[i];
|
LOG(WARNING) << "Invalid accelerator character: " << tokens[i];
|
||||||
key = ui::VKEY_UNKNOWN;
|
key = ui::VKEY_UNKNOWN;
|
||||||
|
|
Loading…
Reference in a new issue