Fix bug that prevented certain triggers from being expanded correctly on Linux

This commit is contained in:
Federico Terzi 2019-11-12 22:48:27 +01:00
parent bb45294b83
commit 58f3ec614f

View File

@ -285,6 +285,13 @@ void left_arrow(int32_t count) {
}
void trigger_paste() {
// Before sending the paste shortcut, trigger the press and release of the Shift key
// this is needed because for some triggers, for example ending with ":", the user
// will still have the Shift key pressed when espanso execute the pasting shortcut,
// therefore sending CTRL+Shift+V instead of CTRL+V.
// With this call, we force the shift key to be unpressed when pasting.
xdo_send_keysequence_window(xdo_context, CURRENTWINDOW, "Shift", 8000);
xdo_send_keysequence_window(xdo_context, CURRENTWINDOW, "Control_L+v", 8000);
}