Thursday, July 29, 2021
1 change · master
Resolved issues and error corrections
Odoo keyboard shortcuts now use the physical key being pressed instead of the character produced by the user's current keyboard layout. This means shortcuts such as Alt+S work consistently for users typing with non-Latin layouts, reducing frustration and layout switching.
Original PR description
Description of the issue/feature this PR addresses: When users work with odoo with local keyboard layout most of shortcuts don't work. This is happened because of hotkey_service uses `event.key` to…
Description of the issue/feature this PR addresses: When users work with odoo with local keyboard layout most of shortcuts don't work. This is happened because of hotkey_service uses `event.key` to determine shortcut. But with non-latin keyboard layout `event.key` is localized. Non-english users have to switch keyboard layout to english to use shortcut, then they have to switch back to enter text. It's annoying. Some users just think that shortcuts in odoo doesn't work at all because they use english layout very rarely. This PR changes hostkey_service so it uses `event.code` to determine pressed key. Current behavior before PR: With non-latin keyboard layout most of shotcuts don't work. F.x. `Alt+S` doesn't work for russian keyboard layout becase hotkey_service interprets this shortcut as `Alt+Ы`. Desired behavior after PR is merged: Shortcuts registered in hotkey_service don't depend on keyboard layout. So pressing `Alt+S` on any keyboard layout will trigger appropriate event listener. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr