mod: change shortcut for jumpstack & fix: inputbox

pull/2/merge
Qingping Hou 12 years ago
parent e9f6ecfb86
commit b33720a567

@ -8,7 +8,7 @@ InputBox = {
input_start_y = nil, input_start_y = nil,
input_cur_x = nil, -- points to the start of next input pos input_cur_x = nil, -- points to the start of next input pos
input_bg = 1, input_bg = 0,
input_string = "", input_string = "",

@ -382,7 +382,7 @@ function PDFReader:inputloop()
self:goto(self.jump_stack[1].page) self:goto(self.jump_stack[1].page)
end end
else else
-- not altmode, exit pdfreader -- not shiftmode, exit pdfreader
self:clearcache() self:clearcache()
if self.doc ~= nil then if self.doc ~= nil then
self.doc:close() self.doc:close()
@ -417,11 +417,9 @@ function PDFReader:inputloop()
self:setglobalzoommode(self.ZOOM_FIT_TO_PAGE_HEIGHT) self:setglobalzoommode(self.ZOOM_FIT_TO_PAGE_HEIGHT)
end end
elseif ev.code == KEY_T then elseif ev.code == KEY_T then
if self.altmode then self:showTOC()
self:showJumpStack() elseif ev.code == KEY_B then
else self:showJumpStack()
self:showTOC()
end
elseif ev.code == KEY_J then elseif ev.code == KEY_J then
self:setrotate( self.globalrotate + 10 ) self:setrotate( self.globalrotate + 10 )
elseif ev.code == KEY_K then elseif ev.code == KEY_K then
@ -488,6 +486,7 @@ function PDFReader:inputloop()
local dur = (nsecs - secs) * 1000000 + nusecs - usecs local dur = (nsecs - secs) * 1000000 + nusecs - usecs
print("E: T="..ev.type.." V="..ev.value.." C="..ev.code.." DUR="..dur) print("E: T="..ev.type.." V="..ev.value.." C="..ev.code.." DUR="..dur)
elseif ev.type == EV_KEY and ev.value == EVENT_VALUE_KEY_RELEASE and ev.code == KEY_SHIFT then elseif ev.type == EV_KEY and ev.value == EVENT_VALUE_KEY_RELEASE and ev.code == KEY_SHIFT then
print "shift haha"
self.shiftmode = false self.shiftmode = false
elseif ev.type == EV_KEY and ev.value == EVENT_VALUE_KEY_RELEASE and ev.code == KEY_ALT then elseif ev.type == EV_KEY and ev.value == EVENT_VALUE_KEY_RELEASE and ev.code == KEY_ALT then
self.altmode = false self.altmode = false

Loading…
Cancel
Save