#10461: SetEventMask(B_KEYBOARD_EVENTS) leads to duplicate Alt-B, Alt-V ..etc ----------------------------------+---------------------------- Reporter: ttcoder | Owner: axeld Type: bug | Status: new Priority: normal | Milestone: R1 Component: Kits/Interface Kit | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 0 | Platform: All ----------------------------------+---------------------------- Comment (by ttcoder): Proposed Solutions: Not sure how feasible it is, but it seems to me SetEventMask() should behave more like SetMouseEventMask() (I might be wrong but I recall that the latter re-routes mouse events instead of adding a ''second'' event snooping copy); maybe SetEventMask(keyboard..) should do the same: stop sending the keyboard events to the window and re-route them to the view... And when applicable, the view would "bounce up" those messages it cannot handle, like Command-Q, Command-W ..etc messages, for the window to eventually process them as it should in its own hooks. Another solution would be to keep the dual-BMessage aspect but fix the special treatment of Command-xyz messages so that it discriminates between the first and second instance of the message: the first instance of e.g. Alt-V would land in the BWindow hooks where it would trigger a B_PASTE (only once!), and the second instance of the Alt-V message would land in the BView KeyDown() hook where it would have a chance of being properly ignored, instead of triggering a second B_PASTE. -- Ticket URL: <https://dev.haiku-os.org/ticket/10461#comment:1> Haiku <https://dev.haiku-os.org> Haiku - the operating system.