# endif
return;
}
+ else if (keysym == XK_C)
+ {
+ selection_make (ev.time, true);
+# if ISO_14755
+ scr_overlay_off ();
+# endif
+ iso14755buf = 0;
+ return;
+ }
+ else if (keysym == XK_V)
+ {
+ selection_request (ev.time, Sel_Clipboard);
+# if ISO_14755
+ scr_overlay_off ();
+# endif
+ iso14755buf = 0;
+ return;
+ }
else if (keysym == XK_BackSpace)
{
iso14755buf = ((iso14755buf & ISO_14755_MASK) >> 4) | ISO_14755_51;
int selection_request_other (Atom target, int selnum) NOTHROW;
void selection_clear (bool clipboard = false) NOTHROW;
void clipboard_copy (Time tm);
- void selection_make (Time tm);
+ void selection_make (Time tm, bool clipboard = false);
bool selection_grab (Time tm, bool clipboard = false) NOTHROW;
void selection_start_colrow (int col, int row) NOTHROW;
void selection_delimit_word (enum page_dirn dirn, const row_col_t *mark, row_col_t *ret) NOTHROW;
#endif
}
+ if (selnum == Sel_Clipboard)
+ return;
+
selection_wait = Sel_none; /* don't loop in selection_paste () */
selection_paste (display->root, XA_CUT_BUFFER0, false);
}
/* ------------------------------------------------------------------------- */
/*
* Copy a selection into the cut buffer
- * EXT: button 1 or 3 release
+ * EXT: button 1 or 3 release, or C-A-c key press
*/
void
-rxvt_term::selection_make (Time tm)
+rxvt_term::selection_make (Time tm, bool clipboard)
{
int i;
wchar_t *new_selection_text;
text_t *t;
+ if (clipboard)
+ {
+ clipboard_copy(tm);
+ return;
+ }
+
switch (selection.op)
{
case SELECTION_CONT:
if (HOOK_INVOKE ((this, HOOK_SEL_GRAB, DT_LONG, (long)tm, DT_END)))
return;
- selection_grab (tm);
+ selection_grab (tm, clipboard);
}
bool