Details
- Browser and browser version: Chrome 109
- OS version: ChromeOS and others
- xterm.js version: ToT
Steps to reproduce
- set screenReaderMode=true
- Press keys such as ctrl+p / ctrl+f. Observe that the printing / find dialog pops up, steals the focus, and makes the user's life miserable 😢
This is caused by the code here, which cancels the key event only if screenReaderMode is off. I wonder if this is to allow the screen reader to handle some key bindings. I am not sure about other OSes, but on ChromeOS, screen reader bindings (e.g. Search+up) works fine even if the key event is canceled. I think we should just always cancel the key event. If there is indeed a need to pass through the key event, the user of xterm.js can set a custom key handler with attachCustomKeyEventHandler(). What do you think?