-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce Device:useDPadAsActionKeys() #11900
Changes from all commits
4e7d7c8
4caa3de
00da47f
b22d965
8b5094f
93b82d5
2fa0e6f
6125e45
316c6a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -233,15 +233,25 @@ end | |
function ReaderLink:onGesture() end | ||
|
||
function ReaderLink:registerKeyEvents() | ||
if Device:hasKeys() and not Device:hasFiveWay() then | ||
if Device:hasScreenKB() or Device:hasSymKey() then | ||
self.key_events.GotoSelectedPageLink = { { "Press" }, event = "GotoSelectedPageLink" } | ||
if Device:hasKeyboard() then | ||
self.key_events.AddCurrentLocationToStack = { { "Shift", "Down" } } | ||
self.key_events.SelectNextPageLink = { { "Shift", "LPgFwd" }, event = "SelectNextPageLink" } | ||
self.key_events.SelectPrevPageLink = { { "Shift", "LPgBack" }, event = "SelectPrevPageLink" } | ||
else | ||
self.key_events.AddCurrentLocationToStack = { { "ScreenKB", "Down" } } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you change this to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like notification true or false is passed as an argument. DIspatcher sets arg=true. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I’ve already tried that and still won’t show it… not sure why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm yes, the true comes through if you add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Being TL;DR: behaving as expected ;). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, so how do we set a source and/or make it show the notification? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We... don't because it's behaving as expected and keyboard shortcuts shouldn't display notifications unless the user asks for it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but this is 'different'...? I need the notification to be shown so it provides feedback on NT kindles, otherwise it would appear as if nothing was happening. Essentially it should work same as if it was coming from dispatcher. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then you need a custom event that either wraps the current one between |
||
self.key_events.SelectNextPageLink = { { "ScreenKB", "LPgFwd" }, event = "SelectNextPageLink" } | ||
self.key_events.SelectPrevPageLink = { { "ScreenKB", "LPgBack" }, event = "SelectPrevPageLink" } | ||
end | ||
elseif Device:hasKeys() then | ||
self.key_events = { | ||
SelectNextPageLink = { | ||
{ "Tab" }, | ||
event = "SelectNextPageLink", | ||
}, | ||
SelectPrevPageLink = { | ||
{ "Shift", "Tab" }, | ||
{ "Sym", "Tab" }, -- Shift or Sym + Tab | ||
event = "SelectPrevPageLink", | ||
}, | ||
GotoSelectedPageLink = { | ||
|
@@ -252,18 +262,6 @@ function ReaderLink:registerKeyEvents() | |
-- when G_reader_settings:readSetting("back_in_reader") == "previous_location" | ||
} | ||
end | ||
if Device:hasFiveWay() then | ||
self.key_events.GotoSelectedPageLink = { { "Press" }, event = "GotoSelectedPageLink" } | ||
if Device:hasKeyboard() then | ||
self.key_events.AddCurrentLocationToStack = { { "Shift", "Down" } } | ||
self.key_events.SelectNextPageLink = { { "Shift", "LPgFwd" }, event = "SelectNextPageLink" } | ||
self.key_events.SelectPrevPageLink = { { "Shift", "LPgBack" }, event = "SelectPrevPageLink" } | ||
else | ||
self.key_events.AddCurrentLocationToStack = { { "ScreenKB", "Down" } } | ||
self.key_events.SelectNextPageLink = { { "ScreenKB", "LPgFwd" }, event = "SelectNextPageLink" } | ||
self.key_events.SelectPrevPageLink = { { "ScreenKB", "LPgBack" }, event = "SelectPrevPageLink" } | ||
end | ||
end | ||
end | ||
|
||
ReaderLink.onPhysicalKeyboardConnected = ReaderLink.registerKeyEvents | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
Shift
+Press