Skip to content
This repository has been archived by the owner on Sep 25, 2020. It is now read-only.

Add normal-key shortcuts for add/delete component in the cfgemu #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/customlua/ocemu/bin/cfgemu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ local function componentConfig()
gpu.set(2,listX+2," ")
listX = listX + 1
gpu.set(2,listX+2,"▶")
elseif evnt[4] == keys.delete then
elseif evnt[4] == keys.delete or evnt[3] == string.byte("d") then
local ok, err = ocemu.disconnect(list[listX][1])
if ok then
table.remove(list, listX)
Expand All @@ -148,7 +148,7 @@ local function componentConfig()
else
setStatus(err or "unknown error")
end
elseif evnt[4] == keys.insert then
elseif evnt[4] == keys.insert or evnt[3] == string.byte("i") then
setStatus("")
local kind = prompt("Component type: ")
local address = prompt("Component address: ")
Expand Down