The following keybindings are working fine on Windows, but don't execute the bound code on Mac. Are the keybindings different between Windows, Mac and Linux?
self._kw.keyboard_win.bind("<Shift-KeyPress-Left>", self._on_shift_cursor_left) self._kw.keyboard_win.bind("<Shift-KeyPress-Right>", self._on_shift_cursor_right) self._kw.keyboard_win.bind("<Shift-KeyRelease-Left>", self._on_shift_cursor_left) self._kw.keyboard_win.bind("<Shift-KeyRelease-Right>", self._on_shift_cursor_right) I tried a few alternatives, based on information I saw in similar questions.
For example:
"<Shift_L-KeyPress-Left>" "<KeyPress-Shift_L-Left>" These caused errors to be raised from tk.
I am able to bind to <KeyPress-Shift_L> or <KeyPress-Left>, but I want the combination of 'Shift and Left' and 'Shift and Right'.
ALL: I deleted the text of my keybinding strings and re-typed them, and now the bindings are working on all platforms (Mac, Win, and Linux). So, there must have been something (hidden) that the Mac version didn't like. Sorry for having not tried that before posing my question.
event.stateand have you tried to bindShift-Keypress<Shift-KeyPress-Left>and<Shift-Left>both work on my mac._on_shift_cursor_leftand_on_shift_cursor_rightfunctions, I test the event.state to see if it was a press or release, and start or end some processing as a result. This works fine on Windows and Linux, but the event handler never gets called when run on my Mac. That is why I tried some alternative bindings (with no luck) and posted this question.