📄 irxevent.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><HTML> <HEAD> <TITLE>LIRC - Linux Infrared Remote Control</TITLE> <LINK REL=stylesheet TYPE="text/css" HREF="../lirc.css"> <META NAME="description" CONTENT="LIRC - Linux Infra-red Remote Control"> <META NAME="keywords" CONTENT="linux, kernel module, remote control, animax, multimedia"> </HEAD> <BODY BACKGROUND="../images/marb18.jpg" BGCOLOR="#FFFFFF" TEXT="#000000" ALINK="#8080FF"> <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0"> <TR> <TD CLASS="menu" WIDTH="100%" HEIGHT="150"> <IMG SRC="../images/diode.gif" ALT="" WIDTH="300" HEIGHT="150" BORDER="0" HSPACE="20" VSPACE="0" ALIGN="LEFT"> <IMG SRC="../images/lirc.gif" ALT="" WIDTH="300" HEIGHT="150" BORDER="0" HSPACE="20" VSPACE="0" ALIGN="RIGHT"> </TD> </TR> <TR> <TD WIDTH="100%"> <BR> <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0"> <TR> <TD WIDTH="15%"> <BR></TD> <TD WIDTH="70%" ALIGN="LEFT" VALIGN="TOP"> <BR><!-- Text ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --><H1>IRXEVENT</H1><HR><A NAME="lbAB"> </A><H2>NAME</H2>irxevent - infrared X-event sender<A NAME="lbAC"> </A><H2>SYNOPSIS</H2><B>irxevent</B>[<I>config file</I>]<A NAME="lbAD"> </A><H2>DESCRIPTION</H2>Irxevent is a program that I wrote to send button clicks and key presses to Xapplications triggered by a LIRC driven remote control. You can control yourfavorite CD/MP3 player or your TV tuner program or any other X applicationthat responds to keyboard or mouse input. If you like to you can send emacs^X^S from your armchair.<P>Irxevent is a complement to irexec and irpty.<DL COMPACT><DT><B>-h</B> <B>--help</B><DD>display usage summary<DT><B>-V</B> <B>--version</B><DD>display version</DL><A NAME="lbAE"> </A><H2>FILES</H2>Irxevent works with the same config file as irexec and irpty (~/.lircrc). Fora complete sample .lircrc look at examples/lircrc.<P><B>Part of your .lircrc could look like this:</B><P><PRE><DL COMPACT><DT><DD>begin prog = irxevent button = VIDEO_UP config = Key SHIFT-KP_Add CurrentWindowendbegin prog = irxevent button = VIDEO_DOWN config = Key SHIFT-KP_Subtract CurrentWindowendbegin prog = irxevent button = STOP config = Key ctrl-c CurrentWindowendbegin prog = irxevent button = 0 config = Key f xawtv config = Key f xawtvendbegin prog = irxevent button = POWER config = Key q xawtvendbegin prog = irxevent button = CH_DOWN config = Button 1 329 92 kscdendbegin prog = irxevent button = UP config = Button 1 110 80 GQmpegendbegin prog = irxevent button = DOWN config = Button 1 130 80 GQmpegend</DL></PRE><P><B>Simply said </B><I>config</I><B> = lines may look like this:</B><P><PRE><DL COMPACT><DT><DD>config = Key [shift-][ctrl-][alt-]<key> <windowname> | WindowID id | CurrentWindow | RootWindowconfig = Button <button> <x> <y> <windowname> | CurrentWindowconfig = xy_Key <x> <y> [shift-][ctrl-][alt-]<key> <windowname> | WindowID id | CurrentWindow | RootWindow</DL></PRE><P><B>some more examples:</B><P><PRE><DL COMPACT><DT><DD>config = Key Up xawtvconfig = Key Down xawtvconfig = Button 1 50 110 xclickmeconfig = Key q xawtvconfig = Key ctrl-c mpg123config = Key shift-Page_Up rxvt</DL></PRE><P><B>In BNF this looks like:</B><P><DL COMPACT><DT><DD><PRE>LINE = "config =" <KEY|BUTTON|XYKEY> <TARGET>XYKEY = "xy_Key" <x_position> <y_position> <MOD>KeynameKEY = "Key" <MOD>KeynameMOD = ["shift-"]["numlock-"]["ctrl-"]["alt-"]["meta-"] ["numlock-"]["mod3-"]["mod4-"]["scrlock-"]BUTTON = "Button" <1..5> <x_position> <y_position>TARGET = Windowname | "WindowID" id | "CurrentWindow" | "RootWindow"</PRE><P><I>Keyname:</I><DL COMPACT><DT><DD>is the key symbol that is declared in X windows. E.g. "Up" refers to thecursor arrow pointing up. "KP_Add" is the plus sign on the key pad. Just takea look at irxevent.keys (in the documentation directory) if you are not sureabout a symbol's name.</DL><I>Windowname:</I><DL COMPACT><DT><DD>can be the first characters of the window name displayed by the window manageror the name that is displayed below the icon. Some programs use the namedisplayed by the window manager to show a lot of status information but don'tchange the icon name (like xawtv). Others append information to the windowname ("GQmpeg - kill_windooz.mp3"). If neither window name nor icon name matchthe given Windowname information from XClassHint(3x) will be checked.</DL><I>CurrentWindow:</I><DL COMPACT><DT><DD>refers to the active window as returned by XGetInputFocus(3x). Most times thisis the window with your mouse pointer in it.</DL><I>RootWindow:</I><DL COMPACT><DT><DD>refers to the <I>root</I> window as returned by RootWindow(3x). You may needthis to send events to the window manager.</DL><I>WindowID id:</I><DL COMPACT><DT><DD>refers to the window with window identifier <I>id</I>. <I>id</I> should be adecimal number. It is useful when irxevent can't find the desired window byother means.</DL></DL><A NAME="lbAF"> </A><H2>TROUBLESHOOTING</H2><P>If you have problems finding the coordinates for a button click you can tryxev -id <window_id>. The window_id can be found using xwininfo. If xev andxwininfo are not part of your distribution you can find them at a FTP serverusing the search engine at: <A HREF="http://ftpsearch.ntnu.no/">http://ftpsearch.ntnu.no/</A> . xev also reports thenames of key symbols like "Control_L" (your left control key) or "KP_Subtract"(the 'minus' key on your keypad).<P>There are programs that do not accept any synthetic X-events by defaultbecause they can cause security problems. Currently xterm and xemacs are knownto ignore events simulated by irxevent.<P>You can however make xterm accept external events by enabling "AllowSendEvents" in the "Main Options" (hold down the Ctrl button and press theleft mouse button inside the xterm window). You can as well place this lineinto your .Xresources file to change this permanently:<P><DL COMPACT><DT><DD>XTerm.vt100.allowSendEvents: true</DL><P>Yet another possibility is to start xterm like this:<P><DL COMPACT><DT><DD>xterm -xrm "XTerm.vt100.allowSendEvents: true"</DL><P>xemacs will accept events if you set a built-in variable. The following wastaken from the online help:<P><DL COMPACT><DT><DD>`x-allow-sendevents' is a built-in boolean variable.<P>Value: t<P>Documentation:<P>*Non-nil means to allow synthetic events. Nil means they are ignored.<P>Beware: allowing emacs to process SendEvents opens a big security hole.<P>In order to allow events you have to evaluate this lisp code (press Meta-x andenter the following expression):<P><TT> </TT> (setq x-allow-sendevents t)<BR><P>Placing this line into your .xemacs-options file should have the same result.</DL><P>If you have problems sending events please drop me an email.<A NAME="lbAG"> </A><H2>AUTHOR</H2>Written by Heinrich Langos <<A HREF="mailto:heinrich@mad.scientist.com">heinrich@mad.scientist.com</A>>.<A NAME="lbAH"> </A><!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <BR><BR> <CENTER>[<A HREF="http://www.lirc.org/">LIRC homepage</A>]<BR> <I>The LIRC Manual, last update: 12-Sep-2002</I></CENTER> <BR><BR> </TD> <TD WIDTH="15%"> <BR></TD> </TR> </TABLE> </TD> </TR> <TR> <TD CLASS="menu" WIDTH="100%"> <BR> </TD> </TR> </TABLE> </BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -