From be7895281370b7cf446f4477df4286ae9134fac5 Mon Sep 17 00:00:00 2001 From: Josip Miskovic Date: Sun, 4 Oct 2020 12:16:31 +0200 Subject: [PATCH] Fix restart shortcuts Recovery called into non-existant code on reset shortcut (copy/paste error). Added second shortcuts for restart and reload, mostly because the scrcpy screen and keyboard mirroring tool does not pass F-keys to app. --- recovery.lua | 5 +---- seed/init.lua | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/recovery.lua b/recovery.lua index 8a2d861..de86150 100644 --- a/recovery.lua +++ b/recovery.lua @@ -64,11 +64,8 @@ function lovr.keypressed(key, scancode, isrepeat) modifiers.alt and 'alt+' or '', modifiers.shift and 'shift+' or '', key) - if combo =='ctrl+r' then + if combo == 'f5' or combo =='ctrl+shift+r' then editors.active:saveFile() - reloadCode(hotswapName) - end - if combo =='ctrl+shift+r' then lovr.event.push('restart') end if combo =='escape' then diff --git a/seed/init.lua b/seed/init.lua index e3ba468..1a16bd9 100644 --- a/seed/init.lua +++ b/seed/init.lua @@ -57,11 +57,11 @@ function lovr.keypressed(key, scancode, isrepeat) modifiers.alt and 'alt+' or '', modifiers.shift and 'shift+' or '', key) - if combo =='ctrl+r' then + if combo == 'f1' or combo == 'ctrl+r' then editors.active:saveFile() reloadCode(hotswapName) end - if combo =='ctrl+shift+r' then + if combo == 'f5' or combo == 'ctrl+shift+r' then lovr.event.push('restart') end if combo =='escape' then