control-q instead of q for exitting apps
This commit is contained in:
@@ -189,7 +189,7 @@ local appPage = UI.Page {
|
||||
},
|
||||
notification = UI.Notification(),
|
||||
accelerators = {
|
||||
q = 'back',
|
||||
[ 'control-q' ] = 'back',
|
||||
backspace = 'back',
|
||||
},
|
||||
}
|
||||
@@ -307,7 +307,7 @@ local categoryPage = UI.Page {
|
||||
statusBar = UI.StatusBar(),
|
||||
accelerators = {
|
||||
l = 'lua',
|
||||
q = 'quit',
|
||||
[ 'control-q' ] = 'quit',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ local peripheralsPage = UI.Page {
|
||||
values = 'Select peripheral',
|
||||
},
|
||||
accelerators = {
|
||||
q = 'quit',
|
||||
[ 'control-q' ] = 'quit',
|
||||
},
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ local methodsPage = UI.Page {
|
||||
status = 'q to return',
|
||||
},
|
||||
accelerators = {
|
||||
q = 'back',
|
||||
[ 'control-q' ] = 'back',
|
||||
backspace = 'back',
|
||||
},
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ local page = UI.Page {
|
||||
p = 'toggle',
|
||||
r = 'reset',
|
||||
c = 'clear',
|
||||
q = 'quit',
|
||||
[ 'control-q' ] = 'quit',
|
||||
},
|
||||
filtered = { },
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ local page = UI.Page {
|
||||
},
|
||||
notification = UI.Notification(),
|
||||
accelerators = {
|
||||
q = 'quit',
|
||||
[ 'control-q' ] = 'quit',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -6,5 +6,3 @@ end
|
||||
|
||||
_ENV.shell.setCompletionFunction("packages/common/edit.lua", c)
|
||||
_ENV.shell.setCompletionFunction("packages/common/hexedit.lua", c)
|
||||
|
||||
fs.mount('packages/common/hexedit.lua', 'urlfs', 'https://pastebin.com/raw/Ds9ajsp4')
|
||||
|
||||
@@ -2,7 +2,6 @@ local input = require('opus.input')
|
||||
|
||||
local colors = _G.colors
|
||||
local fs = _G.fs
|
||||
local keys = _G.keys
|
||||
local multishell = _ENV.multishell
|
||||
local os = _G.os
|
||||
local shell = _ENV.shell
|
||||
@@ -48,28 +47,6 @@ local mark = { }
|
||||
local searchPattern
|
||||
local undo = { chain = { }, pointer = 0 }
|
||||
local complete = { }
|
||||
local clipboard
|
||||
|
||||
-- do we need a clipboard shim
|
||||
if not multishell or not _G.kernel then -- is this OpusOS ?
|
||||
if _G.clipboard then -- has it been installed already
|
||||
clipboard = _G.clipboard
|
||||
else
|
||||
clipboard = { }
|
||||
|
||||
function clipboard.setData(data)
|
||||
clipboard.data = data
|
||||
end
|
||||
|
||||
function clipboard.getText()
|
||||
if clipboard.data then
|
||||
return tostring(clipboard.data)
|
||||
end
|
||||
end
|
||||
|
||||
_G.clipboard = clipboard
|
||||
end
|
||||
end
|
||||
|
||||
local color = {
|
||||
textColor = '0',
|
||||
@@ -145,7 +122,7 @@ local keyMapping = {
|
||||
-- copy/paste
|
||||
[ 'control-x' ] = 'cut',
|
||||
[ 'control-c' ] = 'copy',
|
||||
[ 'control-shift-paste' ] = 'paste_internal',
|
||||
-- [ 'control-shift-paste' ] = 'paste_internal',
|
||||
|
||||
-- file
|
||||
[ 'control-s' ] = 'save',
|
||||
@@ -1038,11 +1015,7 @@ local __actions = {
|
||||
|
||||
copy_marked = function()
|
||||
local text = actions.copyText(mark.x, mark.y, mark.ex, mark.ey)
|
||||
if clipboard then
|
||||
clipboard.setData(text)
|
||||
else
|
||||
os.queueEvent('clipboard_copy', text)
|
||||
end
|
||||
os.queueEvent('clipboard_copy', text)
|
||||
setStatus('shift-^v to paste')
|
||||
end,
|
||||
|
||||
@@ -1072,12 +1045,6 @@ local __actions = {
|
||||
end
|
||||
end,
|
||||
|
||||
paste_internal = function()
|
||||
if clipboard then
|
||||
actions.paste(clipboard.getText())
|
||||
end
|
||||
end,
|
||||
|
||||
go_to = function(cx, cy)
|
||||
y = math.min(math.max(cy, 1), #tLines)
|
||||
x = math.min(math.max(cx, 1), #tLines[y] + 1)
|
||||
|
||||
2
common/etc/fstab
Normal file
2
common/etc/fstab
Normal file
@@ -0,0 +1,2 @@
|
||||
packages/common/ascii.lua urlfs http://pastebin.com/raw/u3kcnyjd
|
||||
packages/common/hexedit.lua urlfs https://pastebin.com/raw/Ds9ajsp4
|
||||
Reference in New Issue
Block a user