在Windows XP上,是否有快捷键可以将剪贴板的内容粘贴到命令提示符窗口中(而不是使用鼠标右键)?
典型的Shift+Insert在这里似乎不起作用。
在Windows XP上,是否有快捷键可以将剪贴板的内容粘贴到命令提示符窗口中(而不是使用鼠标右键)?
典型的Shift+Insert在这里似乎不起作用。
当前回答
我最近发现,命令提示符支持通过鼠标右键单击上下文菜单。你可以在这里找到更多细节:http://www.askdavetaylor.com/copy_paste_within_microsoft_windows_command_prompt.html
其他回答
最简单的方法是复制文本,你想把它粘贴在CMD和打开CMD去“属性”——>“选项”选项卡---->检查(给勾标记)“quickkedit模式”,点击“确定”.....现在你可以从剪贴板粘贴任何文本做右击从你的鼠标。
谢谢你!
我花了一点时间来弄清楚为什么你的AutoHotkey脚本不适合我:
; Use backslash instead of backtick (yes, I am a C++ programmer).
#EscapeChar \
; Paste in command window.
^V::
StringReplace clipboard2, clipboard, \r\n, \n, All
SendInput {Raw}%clipboard2%
return
事实上,它依赖于击键,因此也依赖于键盘布局! 所以当你像我一样不幸只有AZERTY键盘时,你的建议就行不通了。更糟糕的是,我发现没有简单的方法来替换SendInput方法或扭曲它的环境来修复这个问题。例如SendInput "1"不发送数字1。
我必须把每个字符都转换成统一码,才能在我的电脑上使用:
#EscapeChar \
; Paste in command window.
^V::
StringReplace clipboard2, clipboard, \r\n, \n, All
clipboard3 := ""
Loop {
if (a_index>strlen(clipboard2))
break
char_asc := Asc(SubStr(clipboard2, a_Index, 1))
if (char_asc > 127 and char_asc < 256)
add_zero := "0"
else
add_zero := ""
clipboard3 := clipboard3 . "{Asc " . add_zero . char_asc . "}"
}
SendInput %clipboard3%
return
不是很简单……
在Windows 10中,你可以在命令提示符中启用Ctrl + C和Ctrl + V:
不是真的编程相关,但我在谷歌上找到了这个,没有直接的键盘快捷键,但使它更快一点。
启用/关闭快速kedit模式。
Open the MS-DOS program, or the command prompt. Right-click the title bar and press Properties. Select the Options tab. Check or un-check the QuickEdit Mode box. Press OK. In the Apply Properties To Shortcut dialog, select the Apply properties to current window only if you wish to change the QuickEdit setting for this session of this window only, or select Modify shortcut that started this window to change the QuickEdit setting for all future invocations of the command prompt, or MS-DOS program.
当quickkedit启用时,复制文本:
单击并将鼠标指针拖动到所需文本上。 按Enter(或右键单击窗口中的任何位置)将文本复制到剪贴板。
在启用quickkedit时粘贴文本:
右键单击窗口中的任意位置。
当quickkedit被禁用时复制文本:
右键单击标题栏,按菜单上的“编辑”,然后按“标记”。 将鼠标拖到要复制的文本上。 按Enter(或右键单击窗口中的任何位置)将文本复制到剪贴板。
在禁用quickkedit时粘贴文本:
右键单击标题栏,按菜单上的编辑,然后按粘贴。
很简单的解决方案可能是控制台2,重新定义键。