简体   繁体   English

如何更改urxvt中复制/粘贴的默认快捷方式?

[英]How to change the default shortcuts for copy/paste in urxvt?

I'm trying to set up copy/paste actions using ctrl+shift+c/p like it is done in GNOME terminal but for urxvt. 我正在尝试使用ctrl+shift+c/p设置复制/粘贴操作,就像在GNOME终端中完成,但是对于urxvt。 I didn't find any simple solution - it seems like it always requires scripts, hacks etc which gets me annoyed when it comes to such a basic things. 我没有找到任何简单的解决方案 - 它似乎总是需要脚本,黑客等等,这让我感到恼火,当谈到这样一个基本的事情。 That's why I'm wondering if it is possible to just change/add some entries in ~/.Xresource to move the default behavior from ctrl+alt+c/p to ctrl+shift+c/p - since the former already works as expected. 这就是为什么我想知道是否可以在~/.Xresource更改/添加一些条目以将默认行为从ctrl+alt+c/pctrl+shift+c/p - 因为前者已经作为预期。

Also, there is a lot of notions regarding clipboard itself: X calls them "selections" rather than "clipboards"; 此外,关于剪贴板本身有很多概念:X称它们为“选择”而不是“剪贴板”; there are PRIMARY and CLIPBOARD selections; 有PRIMARY和CLIPBOARD选择; etc. I don't really understand all these subtleties - so feel free to be verbose! 我并不是真的了解所有这些微妙之处 - 所以请随意大肆宣传!

I use Xorg server with i3 WM if it makes sense and rxvt-unicode v9.22 - released: 2016-01-23 我使用带有i3 WM的Xorg服务器,如果它有意义并且rxvt-unicode v9.22 - released: 2016-01-23

Contrary to Thomas' answer, it looks like you can. 与托马斯的回答相反,看起来你可以。 In the same question he referenced Spencer and Enno both mention that you can bind the native eval extensions in your .Xresources file. 在同一个问题中,他引用了 Spencer和Enno都提到您可以在.Xresources文件中绑定本机eval扩展。 This would look like the following: 这将如下所示:

URxvt.keysym.Shift-Control-V: eval:paste_clipboard
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard

short: no, you can't 简短:不,你不能

longer: I pointed out in Rebinding CTRL-ALT-[C|V] to CTRL-SHIFT-[C|V] in URxvt >= 9.20 that the binding for these is essentially hardcoded in urxvt without an easy way to change them (aside from external scripts or modifying the program itself). 更长:我在URLvt> = 9.20中将CTRL-ALT- [C | V]重新绑定到CTRL-SHIFT- [C | V]时指出 ,这些绑定基本上是在urxvt中硬编码而没有简单的方法来改变它们(一边)从外部脚本或修改程序本身)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM