Skip to content

[16.0][IMP] web_refresher: hotkey Alt R#3561

Open
DiegoParadeda wants to merge 1 commit into
OCA:16.0from
kmee:imp/refresher-hotkey-r
Open

[16.0][IMP] web_refresher: hotkey Alt R#3561
DiegoParadeda wants to merge 1 commit into
OCA:16.0from
kmee:imp/refresher-hotkey-r

Conversation

@DiegoParadeda
Copy link
Copy Markdown

Adds a simple hotkey to quick refresh the page with Alt + R

image

@pedrobaeza
Copy link
Copy Markdown
Member

Is there the possibility that the S key is assigned by the Odoo automatic hotkey assigner? If so, you should blacklist it.

@DiegoParadeda
Copy link
Copy Markdown
Author

Is there the possibility that the S key is assigned by the Odoo automatic hotkey assigner? If so, you should blacklist it.

Good point. I investigated this in more detail.

In v16 it was technically possible to blacklist a hotkey, as the automatic access key assignment system used _getAllUsedAccessKeys and knownUnusableAccessKeys in addons/web/static/src/legacy/frontend/keyboard_navigation_mixin.js.

However, those legacy implementations were not carried forward. In v18, there no longer seems to be an automatic hotkey attribution system nor a centralized whitelist/blacklist mechanism.

To verify this, I tested overriding the well-known Alt+S behavior and was able to do so without any conflict (not even a warning in the logs):

image

So your concern is definitely valid, but from what I could find there does not appear to be a structured way to reserve or blacklist access keys in the current implementation.

That said, if there is another hotkey management mechanism in v18 that I missed, I'd be happy to adapt the implementation accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants