Тогда просто кодируйте его в!
<input type = "text"
id = "txtSearch"
onkeydown = "if (event.keyCode == 13)
document.getElementById('btnSearch').click()"
/>
<input type = "button"
id = "btnSearch"
value = "Search"
onclick = "doSomething();"
/>
Существуют различные инструменты для доступа к выбору X11, включая xclip и XSel . Обратите внимание, что X11 традиционно имеет множественный выбор, и большинство программ имеют некоторое представление о буфере обмена и основном выборе (которые не одно и то же). Emacs может работать и с вторичным выбором, но это редко, и никто точно не знает, что делать с вырезанными буферами ...
$ xclip -help Usage: xclip [OPTION] [FILE]... Access an X server selection for reading or writing. -i, -in read text into X selection from standard input or files (default) -o, -out prints the selection to standard out (generally for piping to a file or program) -l, -loops number of selection requests to wait for before exiting -d, -display X display to connect to (eg localhost:0") -h, -help usage information -selection selection to access ("primary", "secondary", "clipboard" or "buffer-cut") -noutf8 don't treat text as utf-8, use old unicode -version version information -silent errors only, run in background (default) -quiet run in foreground, show what's happening -verbose running commentary Report bugs to <astrand@lysator.liu.se>
$ xsel -help Usage: xsel [options] Manipulate the X selection. By default the current selection is output and not modified if both standard input and standard output are terminals (ttys). Otherwise, the current selection is output if standard output is not a terminal (tty), and the selection is set from standard input if standard input is not a terminal (tty). If any input or output options are given then the program behaves only in the requested mode. If both input and output is required then the previous selection is output before being replaced by the contents of standard input. Input options -a, --append Append standard input to the selection -f, --follow Append to selection as standard input grows -i, --input Read standard input into the selection Output options -o, --output Write the selection to standard output Action options -c, --clear Clear the selection -d, --delete Request that the selection be cleared and that the application owning it delete its contents Selection options -p, --primary Operate on the PRIMARY selection (default) -s, --secondary Operate on the SECONDARY selection -b, --clipboard Operate on the CLIPBOARD selection -k, --keep Do not modify the selections, but make the PRIMARY and SECONDARY selections persist even after the programs they were selected in exit. -x, --exchange Exchange the PRIMARY and SECONDARY selections X options --display displayname Specify the connection to the X server -t ms, --selectionTimeout ms Specify the timeout in milliseconds within which the selection must be retrieved. A value of 0 (zero) specifies no timeout (default) Miscellaneous options -l, --logfile Specify file to log errors to when detached. -n, --nodetach Do not detach from the controlling terminal. Without this option, xsel will fork to become a background process in input, exchange and keep modes. -h, --help Display this help and exit -v, --verbose Print informative messages --version Output version information and exit Please report bugs to <conrad@vergenet.net>.
Короче говоря, вы должны попробовать xclip -i
/ xclip - o
или xclip -i -sel clip
/ xclip -o -sel clip
или xsel -i
/ xsel -o
или xsel -i -b
/ xsel -o -b
, в зависимости от того, что вы хотите.