Skip to content

Key press handlers to show upper menu#13511

Merged
hius07 merged 4 commits into
koreader:masterfrom
hius07:key-press-menu
Apr 6, 2025
Merged

Key press handlers to show upper menu#13511
hius07 merged 4 commits into
koreader:masterfrom
hius07:key-press-menu

Conversation

@hius07

@hius07 hius07 commented Apr 5, 2025

Copy link
Copy Markdown
Member

Closes #13507.


This change is Reviewable

@hius07 hius07 added the NT Non Touch devices label Apr 5, 2025
@Commodore64user

Copy link
Copy Markdown
Member

I am afraid you are still passing the event object as do_not_show in filemanagermenu. readermenu works fine though

@hius07

hius07 commented Apr 5, 2025

Copy link
Copy Markdown
Member Author

Did you test? Looks okay:

self.key_events.KeyPressShowMenu = { { "Menu" } }

function FileManagerMenu:onKeyPressShowMenu(_, key_ev)
return self:onShowMenu()
end

@hius07

hius07 commented Apr 5, 2025

Copy link
Copy Markdown
Member Author

Maybe because of

filemanagermenu.key_events.ShowMenu = { { "Menu" } }

@Commodore64user

Copy link
Copy Markdown
Member

Maybe because of

filemanagermenu.key_events.ShowMenu = { { "Menu" } }

I am embarrassed to say, you are right. that's the problem.

@Commodore64user Commodore64user left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested

@Commodore64user

Commodore64user commented Apr 5, 2025

Copy link
Copy Markdown
Member

On second thought, shouldn't that onShowMenu event handler be better renamed to showMenu?

@Frenzie

Frenzie commented Apr 5, 2025

Copy link
Copy Markdown
Member

I'm not necessarily jumping for joy at the thought of removing an event handler. Could you clarify that?

@Commodore64user

Copy link
Copy Markdown
Member

No one is directly calling it anymore. Is what i was going to say, before realising that dispatcher still uses it. Never mind

@hius07 hius07 merged commit afb33e8 into koreader:master Apr 6, 2025
@hius07 hius07 deleted the key-press-menu branch April 6, 2025 09:47
@hius07 hius07 added this to the 2025.03 milestone Apr 6, 2025
0xstillb pushed a commit to 0xstillb/koreader-thai that referenced this pull request May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NT Non Touch devices

Projects

None yet

Development

Successfully merging this pull request may close these issues.

k3w: Pressing the physical Menu button does not bring up the top menu

3 participants