Add Shift Insert shortcut on Linux backend

This commit is contained in:
Federico Terzi 2019-11-29 22:20:37 +01:00
parent 182d44580a
commit 87ca08c059
4 changed files with 16 additions and 1 deletions

View File

@ -299,6 +299,10 @@ void trigger_terminal_paste() {
xdo_send_keysequence_window(xdo_context, CURRENTWINDOW, "Control_L+Shift+v", 8000);
}
void trigger_shift_ins_paste() {
xdo_send_keysequence_window(xdo_context, CURRENTWINDOW, "Shift+Insert", 8000);
}
// SYSTEM MODULE
// Function taken from the wmlib tool source code
@ -470,3 +474,5 @@ int32_t is_current_window_terminal() {
return 0;
}

View File

@ -82,6 +82,11 @@ extern "C" void trigger_paste();
*/
extern "C" void trigger_terminal_paste();
/*
* Trigger shift ins pasting( Pressing SHIFT+INS )
*/
extern "C" void trigger_shift_ins_paste();
// SYSTEM MODULE

View File

@ -42,4 +42,5 @@ extern {
pub fn left_arrow(count: i32);
pub fn trigger_paste();
pub fn trigger_terminal_paste();
pub fn trigger_shift_ins_paste();
}

View File

@ -57,7 +57,10 @@ impl super::KeyboardManager for LinuxKeyboardManager {
},
PasteShortcut::CtrlShiftV => {
trigger_terminal_paste();
}
},
PasteShortcut::ShiftInsert=> {
trigger_shift_ins_paste();
},
_ => {
error!("Linux backend does not support this Paste Shortcut, please open an issue on GitHub if you need it.")
}