summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBojidar Marinov <bojidar.marinov.bg@gmail.com>2017-08-06 16:26:07 +0300
committerBojidar Marinov <bojidar.marinov.bg@gmail.com>2017-08-06 16:26:07 +0300
commit7b7c7c8dc0e3572a7d66d274b3e4db43695ce814 (patch)
tree25d57da6ca8f480f0012b10935b96caba6eda32d /core
parent97e942dd42ea5df241e1e81704eaa6c383f3c9b4 (diff)
Rename KEY_RETURN to KEY_ENTER and KEY_ENTER to KEY_KP_ENTER
Closes #7695
Diffstat (limited to 'core')
-rw-r--r--core/global_constants.cpp2
-rw-r--r--core/input_map.cpp4
-rw-r--r--core/os/keyboard.cpp4
-rw-r--r--core/os/keyboard.h4
-rw-r--r--core/project_settings.cpp4
5 files changed, 9 insertions, 9 deletions
diff --git a/core/global_constants.cpp b/core/global_constants.cpp
index 18071d7748..9e745ecb98 100644
--- a/core/global_constants.cpp
+++ b/core/global_constants.cpp
@@ -67,8 +67,8 @@ static _GlobalConstant _global_constants[] = {
BIND_GLOBAL_CONSTANT(KEY_TAB),
BIND_GLOBAL_CONSTANT(KEY_BACKTAB),
BIND_GLOBAL_CONSTANT(KEY_BACKSPACE),
- BIND_GLOBAL_CONSTANT(KEY_RETURN),
BIND_GLOBAL_CONSTANT(KEY_ENTER),
+ BIND_GLOBAL_CONSTANT(KEY_KP_ENTER),
BIND_GLOBAL_CONSTANT(KEY_INSERT),
BIND_GLOBAL_CONSTANT(KEY_DELETE),
BIND_GLOBAL_CONSTANT(KEY_PAUSE),
diff --git a/core/input_map.cpp b/core/input_map.cpp
index 24d0624e98..85e627f352 100644
--- a/core/input_map.cpp
+++ b/core/input_map.cpp
@@ -219,11 +219,11 @@ void InputMap::load_default() {
add_action("ui_accept");
key.instance();
- key->set_scancode(KEY_RETURN);
+ key->set_scancode(KEY_ENTER);
action_add_event("ui_accept", key);
key.instance();
- key->set_scancode(KEY_ENTER);
+ key->set_scancode(KEY_KP_ENTER);
action_add_event("ui_accept", key);
key.instance();
diff --git a/core/os/keyboard.cpp b/core/os/keyboard.cpp
index e154b1934d..9b3e376ea6 100644
--- a/core/os/keyboard.cpp
+++ b/core/os/keyboard.cpp
@@ -42,8 +42,8 @@ static const _KeyCodeText _keycodes[] = {
{KEY_TAB ,"Tab"},
{KEY_BACKTAB ,"BackTab"},
{KEY_BACKSPACE ,"BackSpace"},
- {KEY_RETURN ,"Return"},
{KEY_ENTER ,"Enter"},
+ {KEY_KP_ENTER ,"Kp Enter"},
{KEY_INSERT ,"Insert"},
{KEY_DELETE ,"Delete"},
{KEY_PAUSE ,"Pause"},
@@ -294,8 +294,8 @@ bool keycode_has_unicode(uint32_t p_keycode) {
case KEY_TAB:
case KEY_BACKTAB:
case KEY_BACKSPACE:
- case KEY_RETURN:
case KEY_ENTER:
+ case KEY_KP_ENTER:
case KEY_INSERT:
case KEY_DELETE:
case KEY_PAUSE:
diff --git a/core/os/keyboard.h b/core/os/keyboard.h
index c6985c887d..1ed93e3540 100644
--- a/core/os/keyboard.h
+++ b/core/os/keyboard.h
@@ -57,8 +57,8 @@ enum KeyList {
KEY_TAB = SPKEY | 0x02,
KEY_BACKTAB = SPKEY | 0x03,
KEY_BACKSPACE = SPKEY | 0x04,
- KEY_RETURN = SPKEY | 0x05,
- KEY_ENTER = SPKEY | 0x06,
+ KEY_ENTER = SPKEY | 0x05,
+ KEY_KP_ENTER = SPKEY | 0x06,
KEY_INSERT = SPKEY | 0x07,
KEY_DELETE = SPKEY | 0x08,
KEY_PAUSE = SPKEY | 0x09,
diff --git a/core/project_settings.cpp b/core/project_settings.cpp
index b31f78ec20..f6e0d2e991 100644
--- a/core/project_settings.cpp
+++ b/core/project_settings.cpp
@@ -925,10 +925,10 @@ ProjectSettings::ProjectSettings() {
GLOBAL_DEF("application/config/use_shared_user_dir", true);
key.instance();
- key->set_scancode(KEY_RETURN);
+ key->set_scancode(KEY_ENTER);
va.push_back(key);
key.instance();
- key->set_scancode(KEY_ENTER);
+ key->set_scancode(KEY_KP_ENTER);
va.push_back(key);
key.instance();
key->set_scancode(KEY_SPACE);