mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
bindings.toml, config/bindings.toml file
This commit is contained in:
parent
7fdacffe53
commit
66476ee642
11 changed files with 79 additions and 31 deletions
|
|
@ -15,6 +15,7 @@ static std::unordered_map<std::string, int> keycodes {
|
|||
{"delete", GLFW_KEY_DELETE},
|
||||
{"home", GLFW_KEY_HOME},
|
||||
{"end", GLFW_KEY_END},
|
||||
{"tab", GLFW_KEY_TAB},
|
||||
{"insert", GLFW_KEY_INSERT},
|
||||
{"page-down", GLFW_KEY_PAGE_DOWN},
|
||||
{"page-up", GLFW_KEY_PAGE_UP},
|
||||
|
|
@ -26,6 +27,7 @@ static std::unordered_map<std::string, int> keycodes {
|
|||
{"right-alt", GLFW_KEY_RIGHT_ALT},
|
||||
{"left-super", GLFW_KEY_LEFT_SUPER},
|
||||
{"right-super", GLFW_KEY_RIGHT_SUPER},
|
||||
{"grave-accent", GLFW_KEY_GRAVE_ACCENT},
|
||||
{"left", GLFW_KEY_LEFT},
|
||||
{"right", GLFW_KEY_RIGHT},
|
||||
{"down", GLFW_KEY_DOWN},
|
||||
|
|
@ -59,7 +61,7 @@ void input_util::initialize() {
|
|||
keycodes["f"+std::to_string(i)] = GLFW_KEY_F1+i;
|
||||
}
|
||||
for (char i = 'a'; i <= 'z'; i++) {
|
||||
keycodes[std::to_string(i)] = GLFW_KEY_A-'a'+i;
|
||||
keycodes[std::string({i})] = GLFW_KEY_A-'a'+i;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue