无法在屏幕中使用X剪贴板

时间:2022-09-12 23:01:11

I read the following code in Unix Power Tools on page 117

我在第117页的Unix Power Tools中阅读了以下代码

 *VT100.Translations: #override\
     Button1 <Btn3Down>: select-end(primary,CUT_BUFFER0,CLIPBOARD)\n\
     !Shift <Btn2Up>: insert-selection(CLIPBOARD)\n\
     ~Shift ~Ctrl ~Meta <Btn2Up>: insert-selection(primary,CUT_BUFFER0)

I have not managed to see any effect of the above code.

我没有设法看到上述代码的任何影响。

How can you use X clipboard in Screen, without your mouse?

如何在没有鼠标的情况下在屏幕上使用X剪贴板?

1 个解决方案

#1


Using the mouse. Left-click drag to select and usually the middle mouse button pastes but some terminals may differ (PuTTY uses right-click). If you only have two buttons you click them both together (left mouse button + right mouse button).

使用鼠标。左键单击拖动以选择,通常鼠标中键粘贴,但某些终端可能不同(PuTTY使用右键单击)。如果您只有两个按钮,则可以同时单击它们(鼠标左键+鼠标右键)。

In reply to comment below ("Can you do it without your mouse?"):

回复下面的评论(“你可以不用你的鼠标吗?”):

ctrl-insert : copy

shift-insert : paste

shift-delete : cut

shift-ctrl-C : copy

shift-ctrl-V : paste

Not all applications will support the last three (though Konsole does). In fact most console applications will not allow you to delete text once it's printed.

并非所有应用程序都支持最后三个(尽管Konsole确实如此)。实际上,大多数控制台应用程序都不允许您在打印后删除文本。

As far as selecting text without a mouse I'm not sure there's a generic mechanism for that. It's probably terminal and/or application specific (ie, vim has it's own keys for marking and copying text - but only within vim). You could do it with mouse emulation but I'm sure that would be a painful process.

至于在没有鼠标的情况下选择文本,我不确定是否存在通用机制。它可能是终端和/或应用程序特定的(即,vim有自己的标记和复制文本的键 - 但仅限于vim内)。你可以用鼠标模拟来做到这一点,但我确信这将是一个痛苦的过程。

You can't use the traditional Mac/Windows shortcuts in a terminal because they were reserved for different actions long before these OS existed (ie, Ctrl-C terminates the running process).

您不能在终端中使用传统的Mac / Windows快捷方式,因为它们在这些操作系统存在之前很久就被保留用于不同的操作(即,Ctrl-C终止正在运行的进程)。

I'm trying to use Ctrl-C in X

我正在尝试在X中使用Ctrl-C

X does not handle these operations directly, they are handled by the application. That's why modern GUI programs like Firefox or Gedit support Ctrl-C for copy but terminals and command-line programs generally do not. As I said, it's a conflict in established conventions and Ctrl-C for kill got in first.

X不直接处理这些操作,它们由应用程序处理。这就是为什么像Firefox或Gedit这样的现代GUI程序支持Ctrl-C进行复制,但终端和命令行程序通常不支持。正如我所说,这是已建立的约定中的冲突,并且首先是Ctrl-C for kill。

BTW, you could do some key-remapping if it drives you nuts but then you would be learning bad habits when you use a different machine. Best to just get used to it or do most of your editing in a GUI application.

顺便说一句,你可以做一些关键重映射,如果它让你疯了但是当你使用不同的机器时你会学习坏习惯。最好习惯它或在GUI应用程序中进行大部分编辑。

More Information

EDIT: For a Mac, this may help: MacOSX-to-Konsole or This or This. It looks like you need to replace Ctrl with Command on Mac keyboards. It seems like Terminal the mac console has a right-click context menu for copy-paste so to do it the traditional way you me need to install a different console program or change some settings in Terminal.

编辑:对于Mac,这可能会有所帮助:MacOSX-to-Konsole或This or This。看起来您需要在Mac键盘上将Command替换为Command。看起来像终端mac控制台有一个右键单击上下文菜单进行复制粘贴,所以这是我需要安装不同的控制台程序或更改终端中的一些设置的传统方式。

#1


Using the mouse. Left-click drag to select and usually the middle mouse button pastes but some terminals may differ (PuTTY uses right-click). If you only have two buttons you click them both together (left mouse button + right mouse button).

使用鼠标。左键单击拖动以选择,通常鼠标中键粘贴,但某些终端可能不同(PuTTY使用右键单击)。如果您只有两个按钮,则可以同时单击它们(鼠标左键+鼠标右键)。

In reply to comment below ("Can you do it without your mouse?"):

回复下面的评论(“你可以不用你的鼠标吗?”):

ctrl-insert : copy

shift-insert : paste

shift-delete : cut

shift-ctrl-C : copy

shift-ctrl-V : paste

Not all applications will support the last three (though Konsole does). In fact most console applications will not allow you to delete text once it's printed.

并非所有应用程序都支持最后三个(尽管Konsole确实如此)。实际上,大多数控制台应用程序都不允许您在打印后删除文本。

As far as selecting text without a mouse I'm not sure there's a generic mechanism for that. It's probably terminal and/or application specific (ie, vim has it's own keys for marking and copying text - but only within vim). You could do it with mouse emulation but I'm sure that would be a painful process.

至于在没有鼠标的情况下选择文本,我不确定是否存在通用机制。它可能是终端和/或应用程序特定的(即,vim有自己的标记和复制文本的键 - 但仅限于vim内)。你可以用鼠标模拟来做到这一点,但我确信这将是一个痛苦的过程。

You can't use the traditional Mac/Windows shortcuts in a terminal because they were reserved for different actions long before these OS existed (ie, Ctrl-C terminates the running process).

您不能在终端中使用传统的Mac / Windows快捷方式,因为它们在这些操作系统存在之前很久就被保留用于不同的操作(即,Ctrl-C终止正在运行的进程)。

I'm trying to use Ctrl-C in X

我正在尝试在X中使用Ctrl-C

X does not handle these operations directly, they are handled by the application. That's why modern GUI programs like Firefox or Gedit support Ctrl-C for copy but terminals and command-line programs generally do not. As I said, it's a conflict in established conventions and Ctrl-C for kill got in first.

X不直接处理这些操作,它们由应用程序处理。这就是为什么像Firefox或Gedit这样的现代GUI程序支持Ctrl-C进行复制,但终端和命令行程序通常不支持。正如我所说,这是已建立的约定中的冲突,并且首先是Ctrl-C for kill。

BTW, you could do some key-remapping if it drives you nuts but then you would be learning bad habits when you use a different machine. Best to just get used to it or do most of your editing in a GUI application.

顺便说一句,你可以做一些关键重映射,如果它让你疯了但是当你使用不同的机器时你会学习坏习惯。最好习惯它或在GUI应用程序中进行大部分编辑。

More Information

EDIT: For a Mac, this may help: MacOSX-to-Konsole or This or This. It looks like you need to replace Ctrl with Command on Mac keyboards. It seems like Terminal the mac console has a right-click context menu for copy-paste so to do it the traditional way you me need to install a different console program or change some settings in Terminal.

编辑:对于Mac,这可能会有所帮助:MacOSX-to-Konsole或This or This。看起来您需要在Mac键盘上将Command替换为Command。看起来像终端mac控制台有一个右键单击上下文菜单进行复制粘贴,所以这是我需要安装不同的控制台程序或更改终端中的一些设置的传统方式。