一堆场景同时允许回车键和小键盘回车键
This commit is contained in:
@@ -323,7 +323,7 @@ function scene.keyDown(key,isRep)
|
||||
elseif key=='1' or key=='2' then (kb.isDown('lshift','lctrl','lalt') and playRep or setFocus)(key=='1' and 1 or 2)
|
||||
elseif key=='c1' then playRep(1)
|
||||
elseif key=='c2' then playRep(2)
|
||||
elseif key=='return' then
|
||||
elseif key=='return' or key=='kpenter' then
|
||||
if repeater.focus then
|
||||
repeater.focus=false
|
||||
end
|
||||
|
||||
@@ -107,7 +107,7 @@ function scene.keyDown(key)
|
||||
val=val..key
|
||||
end
|
||||
end
|
||||
elseif key=='return' then
|
||||
elseif key=='return' or key=='kpenter' then
|
||||
scene.keyDown('calculate')
|
||||
elseif key=='calculate' then
|
||||
val=val:gsub("e$","")
|
||||
|
||||
@@ -27,7 +27,7 @@ end
|
||||
function scene.keyDown(key,rep)
|
||||
if key=='escape' and not rep then
|
||||
SCN.back()
|
||||
elseif key=='return' then
|
||||
elseif key=='return' or key=='kpenter' then
|
||||
if #scene.widgetList.code:getText():upper()==0 then
|
||||
_getCode()
|
||||
else
|
||||
|
||||
@@ -130,7 +130,7 @@ function scene.touchClick(x,y)
|
||||
end
|
||||
function scene.keyDown(key,isRep)
|
||||
if isRep then return end
|
||||
if key=='return' then
|
||||
if key=='return' or key=='kpenter' then
|
||||
if mapCam.sel then
|
||||
if visibleModes[mapCam.sel]==2 then
|
||||
MES.new('info',text.unlockHint)
|
||||
|
||||
@@ -133,7 +133,7 @@ function scene.keyDown(key,isRep)
|
||||
else
|
||||
_quit()
|
||||
end
|
||||
elseif key=='return' then
|
||||
elseif key=='return' or key=='kpenter' then
|
||||
local mes=STRING.trim(inputBox:getText())
|
||||
if not inputBox.hide and #mes>0 then
|
||||
if mes:sub(1,1)=='/' then
|
||||
|
||||
@@ -82,7 +82,7 @@ function scene.keyDown(key)
|
||||
if fetchTimer<=7 then
|
||||
_fetchRoom()
|
||||
end
|
||||
elseif roomList:getLen()>0 and (key=='join' or key=='return' and love.keyboard.isDown('lctrl','rctrl')) then
|
||||
elseif roomList:getLen()>0 and (key=='join' or (key=='return' or key=='kpenter') and love.keyboard.isDown('lctrl','rctrl')) then
|
||||
local R=roomList:getSel()
|
||||
if R and not TASK.getLock('fetchRoom') then
|
||||
if R.info.version==VERSION.room then
|
||||
|
||||
@@ -72,7 +72,7 @@ function scene.sceneInit()
|
||||
end
|
||||
|
||||
function scene.keyDown(key)
|
||||
if key=='return' then
|
||||
if key=='return' or key=='kpenter' then
|
||||
local rep=listBox:getSel()
|
||||
if rep then
|
||||
_playRep(rep.fileName)
|
||||
|
||||
@@ -23,7 +23,7 @@ end
|
||||
function scene.keyDown(key,rep)
|
||||
if key=='escape' and not rep then
|
||||
SCN.back()
|
||||
elseif key=='return' then
|
||||
elseif key=='return' or key=='kpenter' then
|
||||
if #scene.widgetList.code:getText()==0 then
|
||||
NET.getCode(USER.email)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user