diff --git a/Cargo.lock b/Cargo.lock index f646459..9f2dae4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -370,7 +370,7 @@ dependencies = [ [[package]] name = "espanso" -version = "0.3.4" +version = "0.3.5" dependencies = [ "backtrace 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index e75a34c..1812ac1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "espanso" -version = "0.3.4" +version = "0.3.5" authors = ["Federico Terzi "] license = "GPL-3.0" description = "Cross-platform Text Expander written in Rust" diff --git a/native/liblinuxbridge/bridge.cpp b/native/liblinuxbridge/bridge.cpp index fa36d28..b757ff4 100644 --- a/native/liblinuxbridge/bridge.cpp +++ b/native/liblinuxbridge/bridge.cpp @@ -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); } @@ -456,6 +463,8 @@ int32_t is_current_window_terminal() { return 1; }else if (strstr(class_buffer, "St") != NULL) { // Simple terminal return 1; + }else if (strstr(class_buffer, "Alacritty") != NULL) { // Alacritty terminal + return 1; } } diff --git a/packager/win/setupscript.iss b/packager/win/setupscript.iss index 169a4f3..0e24a1b 100644 --- a/packager/win/setupscript.iss +++ b/packager/win/setupscript.iss @@ -30,6 +30,7 @@ Compression=lzma SolidCompression=yes WizardStyle=modern ChangesEnvironment=yes +AlwaysRestart = yes [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" @@ -62,7 +63,7 @@ end; [Run] Filename: {tmp}\vc_redist.x64.exe; \ - Parameters: "/install /quiet"; \ + Parameters: "/install /quiet /norestart"; \ StatusMsg: "Installing Visual C++ 2019 Redistributable"; Filename: "{app}\{#MyAppExeName}"; Parameters: "start"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent