Skip to content

Commit

Permalink
Fix restart shortcuts
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jmiskovic committed Oct 4, 2020
1 parent 3e63749 commit be78952
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions recovery.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions seed/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit be78952

Please sign in to comment.