From 354d4f80bf814940e844d49fdf39d9710cc937b6 Mon Sep 17 00:00:00 2001 From: MrZ_26 <1046101471@qq.com> Date: Wed, 26 Oct 2022 10:57:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E5=A0=86=E5=9C=BA=E6=99=AF=E5=90=8C?= =?UTF-8?q?=E6=97=B6=E5=85=81=E8=AE=B8=E5=9B=9E=E8=BD=A6=E9=94=AE=E5=92=8C?= =?UTF-8?q?=E5=B0=8F=E9=94=AE=E7=9B=98=E5=9B=9E=E8=BD=A6=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/app_2048.lua | 2 +- parts/scenes/app_calc.lua | 2 +- parts/scenes/login_mail.lua | 2 +- parts/scenes/mode.lua | 2 +- parts/scenes/net_game.lua | 2 +- parts/scenes/net_rooms.lua | 2 +- parts/scenes/replays.lua | 2 +- parts/scenes/reset_password.lua | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/parts/scenes/app_2048.lua b/parts/scenes/app_2048.lua index f642a4fe..6e856ac6 100644 --- a/parts/scenes/app_2048.lua +++ b/parts/scenes/app_2048.lua @@ -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 diff --git a/parts/scenes/app_calc.lua b/parts/scenes/app_calc.lua index 2c79a14a..4a60ab85 100644 --- a/parts/scenes/app_calc.lua +++ b/parts/scenes/app_calc.lua @@ -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$","") diff --git a/parts/scenes/login_mail.lua b/parts/scenes/login_mail.lua index af5544e4..5cfce5f4 100644 --- a/parts/scenes/login_mail.lua +++ b/parts/scenes/login_mail.lua @@ -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 diff --git a/parts/scenes/mode.lua b/parts/scenes/mode.lua index 5e44e0fc..57d603ee 100644 --- a/parts/scenes/mode.lua +++ b/parts/scenes/mode.lua @@ -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) diff --git a/parts/scenes/net_game.lua b/parts/scenes/net_game.lua index 96d64fbb..cd4dd6b9 100644 --- a/parts/scenes/net_game.lua +++ b/parts/scenes/net_game.lua @@ -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 diff --git a/parts/scenes/net_rooms.lua b/parts/scenes/net_rooms.lua index 40fd2928..ed195725 100644 --- a/parts/scenes/net_rooms.lua +++ b/parts/scenes/net_rooms.lua @@ -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 diff --git a/parts/scenes/replays.lua b/parts/scenes/replays.lua index c8037912..c2a50242 100644 --- a/parts/scenes/replays.lua +++ b/parts/scenes/replays.lua @@ -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) diff --git a/parts/scenes/reset_password.lua b/parts/scenes/reset_password.lua index 17a9c1d7..854e6a3b 100644 --- a/parts/scenes/reset_password.lua +++ b/parts/scenes/reset_password.lua @@ -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