[chore] Code cleanup : deprecate the 'Enter' event, replaced with 'Press' (#3815)

'Escape' now do 'Back' on SDL
'Enter' now do 'Press' on SDL
pull/3819/head
onde2rock 6 years ago committed by Frans de Jonge
parent ae9d71de5f
commit 74a06d98a2

@ -19,7 +19,7 @@ return {
[60] = "Shift", -- SHIFT_RIGHT
[62] = " ", -- SPACE
[63] = "Sym", -- SYM
[66] = "Enter", -- ENTER
[66] = "Press", -- ENTER
[67] = "Del", -- DEL
[76] = "/", -- SLASH
[82] = "Menu", -- MENU

@ -93,8 +93,8 @@ local Input = {
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
"N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
"Up", "Down", "Left", "Right", "Press",
"Back", "Enter", "Sym", "AA", "Menu", "Home", "Del",
"Up", "Down", "Left", "Right", "Press", "Backspace", "End",
"Back", "Sym", "AA", "Menu", "Home", "Del",
"LPgBack", "RPgBack", "LPgFwd", "RPgFwd"
},
},

@ -8,7 +8,7 @@ return {
[30] = "A", [31] = "S", [32] = "D", [33] = "F", [34] = "G", [35] = "H", [36] = "J", [37] = "K", [38] = "L", [14] = "Del",
[44] = "Z", [45] = "X", [46] = "C", [47] = "V", [48] = "B", [49] = "N", [50] = "M", [52] = ".", [53] = "/", -- only KDX
[28] = "Enter",
[28] = "Press",
[42] = "Shift",
[56] = "Alt",
[57] = " ",

@ -4,8 +4,8 @@ return {
[38] = "A", [39] = "S", [40] = "D", [41] = "F", [42] = "G", [43] = "H", [44] = "J", [45] = "K", [46] = "L",
[52] = "Z", [53] = "X", [54] = "C", [55] = "V", [56] = "B", [57] = "N", [58] = "M",
[22] = "Back", -- Backspace
[36] = "Enter", -- Enter
[22] = "Backspace", -- Backspace
[36] = "Press", -- Enter
[50] = "Shift", -- left shift
[60] = ".",
[61] = "/",
@ -24,7 +24,7 @@ return {
[112] = "RPgBack", -- normal PageUp
[113] = "Left", -- arrow left
[114] = "Right", -- arrow right
[115] = "Press", -- End (above arrows)
[115] = "End", -- End (above arrows)
[116] = "Down", -- arrow down
[117] = "RPgFwd", -- normal PageDown
[119] = "Del", -- Delete

@ -6,8 +6,9 @@ return {
[28] = "Y", [29] = "Z", [30] = "1", [31] = "2", [32] = "3", [33] = "4",
[34] = "5", [35] = "6", [36] = "7", [37] = "8", [38] = "9", [39] = "0",
[42] = "Back", -- Backspace
[40] = "Enter", -- Enter
[42] = "Backspace", -- Backspace
[41] = "Back", -- Escape
[40] = "Press", -- Enter
[225] = "Shift", -- left shift
[55] = ".",
[56] = "/",
@ -27,7 +28,7 @@ return {
[75] = "RPgBack", -- normal PageUp
[80] = "Left", -- arrow left
[79] = "Right", -- arrow right
[77] = "Press", -- End (above arrows)
[77] = "End", -- End (above arrows)
[81] = "Down", -- arrow down
[78] = "RPgFwd", -- normal PageDown
[76] = "Del", -- Delete

@ -88,7 +88,7 @@ function ButtonTable:init()
if Device:hasKeys() then
self.layout = self.buttons_layout
self.layout[1][1]:onFocus()
self.key_events.SelectByKeyPress = { {{"Press", "Enter"}} }
self.key_events.SelectByKeyPress = { {{"Press"}} }
else
self.key_events = {} -- deregister all key press event listeners
end

@ -464,7 +464,7 @@ local Menu = FocusManager:new{
item_shortcuts = {
"Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P",
"A", "S", "D", "F", "G", "H", "J", "K", "L", "Del",
"Z", "X", "C", "V", "B", "N", "M", ".", "Sym", "Enter",
"Z", "X", "C", "V", "B", "N", "M", ".", "Sym",
},
item_table_stack = nil,
is_enable_shortcut = true,
@ -844,9 +844,6 @@ function Menu:updateItems(select_number)
shortcut_style = "grey_square"
end
item_shortcut = self.item_shortcuts[c]
if item_shortcut == "Enter" then
item_shortcut = "Ent"
end
end
local item_tmp = MenuItem:new{
show_parent = self.show_parent,

@ -118,7 +118,7 @@ function RadioButtonTable:init()
if Device:hasDPad() or Device:hasKeyboard() then
self.layout = self.radio_buttons_layout
self.layout[1][1]:onFocus()
self.key_events.SelectByKeyPress = { {{"Press", "Enter"}} }
self.key_events.SelectByKeyPress = { {{"Press"}} }
else
self.key_events = {} -- deregister all key press event listeners
end

@ -775,9 +775,6 @@ function ListMenu:_updateItemsBuildUI()
shortcut_style = "grey_square"
end
item_shortcut = self.item_shortcuts[idx]
if item_shortcut == "Enter" then
item_shortcut = "Ent"
end
end
local item_tmp = ListMenuItem:new{

@ -740,9 +740,6 @@ function MosaicMenu:_updateItemsBuildUI()
shortcut_style = "grey_square"
end
item_shortcut = self.item_shortcuts[idx]
if item_shortcut == "Enter" then
item_shortcut = "Ent"
end
end
local item_tmp = MosaicMenuItem:new{

Loading…
Cancel
Save