First of all, thanks for this great package 🙌
One issue that I currently have is that with enter_to_paste=True, both Enter and Shift+Enter paste. No setting gives "Enter pastes, Shift+Enter copies-only".
keyboard_mixin.py hardcodes plain Enter, and clipboard_mixin.py (~L269) short-circuits on ENTER_TO_PASTE:
# keyboard_mixin.py
(False, False, KEY_Return): lambda: self._handle_return(False), # Enter
(False, True, KEY_Return): lambda: self._handle_return(not ENTER_TO_PASTE) # Shift+Enter
# clipboard_mixin.py
if ENTER_TO_PASTE or with_paste_simulation: # paste
|
False |
True |
| Enter |
copy |
paste |
| Shift+Enter |
paste |
paste |
I'd like for the two keys to be the inverse — True → Enter pastes / Shift+Enter copies-only; False → vice versa, so that I can have the default be to paste, but then have an escape hatch with Shift+Enter to not paste on certain cases.
The fix I see is to bind plain Enter to _handle_return(ENTER_TO_PASTE) and drop the ENTER_TO_PASTE or short-circuit.
Would you accept a PR with this change? And if so, should it be a new configuration field, or when people enable enter_to_paste we always make Shift+Enter not paste?
Version: 0.9.1
First of all, thanks for this great package 🙌
One issue that I currently have is that with
enter_to_paste=True, both Enter and Shift+Enter paste. No setting gives "Enter pastes, Shift+Enter copies-only".keyboard_mixin.pyhardcodes plain Enter, andclipboard_mixin.py(~L269) short-circuits onENTER_TO_PASTE:FalseTrueI'd like for the two keys to be the inverse —
True→ Enter pastes / Shift+Enter copies-only;False→ vice versa, so that I can have the default be to paste, but then have an escape hatch withShift+Enterto not paste on certain cases.The fix I see is to bind plain Enter to
_handle_return(ENTER_TO_PASTE)and drop theENTER_TO_PASTE orshort-circuit.Would you accept a PR with this change? And if so, should it be a new configuration field, or when people enable
enter_to_pastewe always make Shift+Enter not paste?Version: 0.9.1