forked from Milek7/maszyna
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheditorkeyboardinput.cpp
38 lines (31 loc) · 956 Bytes
/
editorkeyboardinput.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/
#include "stdafx.h"
#include "editorkeyboardinput.h"
bool
editorkeyboard_input::init() {
default_bindings();
// TODO: re-enable after mode-specific binding import is in place
// return recall_bindings();
bind();
m_bindingsetups.clear();
return true;
}
void
editorkeyboard_input::default_bindings() {
m_bindingsetups = {
{ user_command::moveleft, GLFW_KEY_LEFT },
{ user_command::moveright, GLFW_KEY_RIGHT },
{ user_command::moveforward, GLFW_KEY_UP },
{ user_command::moveback, GLFW_KEY_DOWN },
{ user_command::moveup, GLFW_KEY_PAGE_UP },
{ user_command::movedown, GLFW_KEY_PAGE_DOWN },
};
}
//---------------------------------------------------------------------------