control-q instead of q for exitting apps
This commit is contained in:
@@ -597,7 +597,7 @@ local startPage = UI.Page {
|
|||||||
throttle = UI.Throttle { },
|
throttle = UI.Throttle { },
|
||||||
accelerators = {
|
accelerators = {
|
||||||
x = 'test',
|
x = 'test',
|
||||||
q = 'quit'
|
[ 'control-q' ] = 'quit'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ local appPage = UI.Page {
|
|||||||
},
|
},
|
||||||
notification = UI.Notification(),
|
notification = UI.Notification(),
|
||||||
accelerators = {
|
accelerators = {
|
||||||
q = 'back',
|
[ 'control-q' ] = 'back',
|
||||||
backspace = 'back',
|
backspace = 'back',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -307,7 +307,7 @@ local categoryPage = UI.Page {
|
|||||||
statusBar = UI.StatusBar(),
|
statusBar = UI.StatusBar(),
|
||||||
accelerators = {
|
accelerators = {
|
||||||
l = 'lua',
|
l = 'lua',
|
||||||
q = 'quit',
|
[ 'control-q' ] = 'quit',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ local peripheralsPage = UI.Page {
|
|||||||
values = 'Select peripheral',
|
values = 'Select peripheral',
|
||||||
},
|
},
|
||||||
accelerators = {
|
accelerators = {
|
||||||
q = 'quit',
|
[ 'control-q' ] = 'quit',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ local methodsPage = UI.Page {
|
|||||||
status = 'q to return',
|
status = 'q to return',
|
||||||
},
|
},
|
||||||
accelerators = {
|
accelerators = {
|
||||||
q = 'back',
|
[ 'control-q' ] = 'back',
|
||||||
backspace = 'back',
|
backspace = 'back',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ local page = UI.Page {
|
|||||||
p = 'toggle',
|
p = 'toggle',
|
||||||
r = 'reset',
|
r = 'reset',
|
||||||
c = 'clear',
|
c = 'clear',
|
||||||
q = 'quit',
|
[ 'control-q' ] = 'quit',
|
||||||
},
|
},
|
||||||
filtered = { },
|
filtered = { },
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ local page = UI.Page {
|
|||||||
},
|
},
|
||||||
notification = UI.Notification(),
|
notification = UI.Notification(),
|
||||||
accelerators = {
|
accelerators = {
|
||||||
q = 'quit',
|
[ 'control-q' ] = 'quit',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,5 +6,3 @@ end
|
|||||||
|
|
||||||
_ENV.shell.setCompletionFunction("packages/common/edit.lua", c)
|
_ENV.shell.setCompletionFunction("packages/common/edit.lua", c)
|
||||||
_ENV.shell.setCompletionFunction("packages/common/hexedit.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 colors = _G.colors
|
||||||
local fs = _G.fs
|
local fs = _G.fs
|
||||||
local keys = _G.keys
|
|
||||||
local multishell = _ENV.multishell
|
local multishell = _ENV.multishell
|
||||||
local os = _G.os
|
local os = _G.os
|
||||||
local shell = _ENV.shell
|
local shell = _ENV.shell
|
||||||
@@ -48,28 +47,6 @@ local mark = { }
|
|||||||
local searchPattern
|
local searchPattern
|
||||||
local undo = { chain = { }, pointer = 0 }
|
local undo = { chain = { }, pointer = 0 }
|
||||||
local complete = { }
|
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 = {
|
local color = {
|
||||||
textColor = '0',
|
textColor = '0',
|
||||||
@@ -145,7 +122,7 @@ local keyMapping = {
|
|||||||
-- copy/paste
|
-- copy/paste
|
||||||
[ 'control-x' ] = 'cut',
|
[ 'control-x' ] = 'cut',
|
||||||
[ 'control-c' ] = 'copy',
|
[ 'control-c' ] = 'copy',
|
||||||
[ 'control-shift-paste' ] = 'paste_internal',
|
-- [ 'control-shift-paste' ] = 'paste_internal',
|
||||||
|
|
||||||
-- file
|
-- file
|
||||||
[ 'control-s' ] = 'save',
|
[ 'control-s' ] = 'save',
|
||||||
@@ -1038,11 +1015,7 @@ local __actions = {
|
|||||||
|
|
||||||
copy_marked = function()
|
copy_marked = function()
|
||||||
local text = actions.copyText(mark.x, mark.y, mark.ex, mark.ey)
|
local text = actions.copyText(mark.x, mark.y, mark.ex, mark.ey)
|
||||||
if clipboard then
|
os.queueEvent('clipboard_copy', text)
|
||||||
clipboard.setData(text)
|
|
||||||
else
|
|
||||||
os.queueEvent('clipboard_copy', text)
|
|
||||||
end
|
|
||||||
setStatus('shift-^v to paste')
|
setStatus('shift-^v to paste')
|
||||||
end,
|
end,
|
||||||
|
|
||||||
@@ -1072,12 +1045,6 @@ local __actions = {
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
paste_internal = function()
|
|
||||||
if clipboard then
|
|
||||||
actions.paste(clipboard.getText())
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
|
|
||||||
go_to = function(cx, cy)
|
go_to = function(cx, cy)
|
||||||
y = math.min(math.max(cy, 1), #tLines)
|
y = math.min(math.max(cy, 1), #tLines)
|
||||||
x = math.min(math.max(cx, 1), #tLines[y] + 1)
|
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
|
||||||
@@ -188,7 +188,7 @@ local mainPage = UI.Page({
|
|||||||
autospace = true,
|
autospace = true,
|
||||||
}),
|
}),
|
||||||
accelerators = {
|
accelerators = {
|
||||||
q = 'quit',
|
[ 'control-q' ] = 'quit',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ local page = UI.Page {
|
|||||||
first = UI.Button { x = 2, y = 11, text = 'First', event = 'firstCoord' },
|
first = UI.Button { x = 2, y = 11, text = 'First', event = 'firstCoord' },
|
||||||
cancel = UI.Button { x = 2, y = -3, text = 'Abort', event = 'cancel' },
|
cancel = UI.Button { x = 2, y = -3, text = 'Abort', event = 'cancel' },
|
||||||
begin = UI.Button { x = -8, y = -3, text = 'Begin', event = 'begin' },
|
begin = UI.Button { x = -8, y = -3, text = 'Begin', event = 'begin' },
|
||||||
accelerators = { q = 'quit' },
|
accelerators = { [ 'control-q' ] = 'quit' },
|
||||||
notification = UI.Notification(),
|
notification = UI.Notification(),
|
||||||
statusBar = UI.StatusBar(),
|
statusBar = UI.StatusBar(),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,8 +106,7 @@ local page = UI.Page {
|
|||||||
[ 'control-e' ] = 'eject',
|
[ 'control-e' ] = 'eject',
|
||||||
[ 'control-s' ] = 'eject_stack',
|
[ 'control-s' ] = 'eject_stack',
|
||||||
[ 'control-a' ] = 'eject_all',
|
[ 'control-a' ] = 'eject_all',
|
||||||
|
[ 'control-q' ] = 'quit',
|
||||||
q = 'quit',
|
|
||||||
},
|
},
|
||||||
items = { },
|
items = { },
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ local page = UI.Page {
|
|||||||
|
|
||||||
[ 'control-m' ] = 'network',
|
[ 'control-m' ] = 'network',
|
||||||
|
|
||||||
q = 'quit',
|
[ 'control-q' ] = 'quit',
|
||||||
},
|
},
|
||||||
allItems = { }
|
allItems = { }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ local page = UI.Page {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
accelerators = {
|
accelerators = {
|
||||||
q = 'cancel',
|
[ 'control-q' ] = 'cancel',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ local page = UI.Page {
|
|||||||
sortColumn = 'displayName',
|
sortColumn = 'displayName',
|
||||||
},
|
},
|
||||||
accelerators = {
|
accelerators = {
|
||||||
q = 'quit',
|
[ 'control-q' ] = 'quit',
|
||||||
},
|
},
|
||||||
detail = UI.SlideOut {
|
detail = UI.SlideOut {
|
||||||
menuBar = UI.MenuBar {
|
menuBar = UI.MenuBar {
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ local page = UI.Page {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
accelerators = {
|
accelerators = {
|
||||||
q = 'quit',
|
[ 'control-q' ] = 'quit',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user