<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Matt,<div class=""><br class=""></div><div class=""> There is a way to send commands (and shortcuts) to Chimera 1 that you may not know about that does not require the focus — it uses http to send commands to Chimera. Here’s how it works.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>$ chimera --start RESTServer</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>REST server on host 127.0.0.1 port 55169 </div><div class=""><br class=""></div><div class="">I start Chimera with the above RESTServer option and it tells me it is listening on localhost (127.0.0.1) port 55169. Then I type in my web browser url</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><a href="http://localhost:55169/run?command=open 1a0m" class="">http://localhost:55169/run?command=open%201a0m</a></div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><a href="http://localhost:55169/run?command=display" class="">http://localhost:55169/run?command=display</a></div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><a href="http://localhost:55169/run?command=ac sp" class="">http://localhost:55169/run?command=ac%20sp</a></div><div class=""><br class=""></div><div class="">The first url opens 1a0m in Chimera. The “%20” is the escape sequence for a space character. The second url displays the atoms with the “display” command. And the third URL runs keyboard shortcut sp (display atoms as spheres) using the command “ac sp” (ac is to run accelerators ie shorcuts).</div><div class=""><br class=""></div><div class=""> So to connect an input device you just need it to be able to send http requests. Instead of using a browser you could use some standard command-line program like wget or curl to send the http requests:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>$ curl <a href="http://localhost:55169/run?command=turn y 1 90" class="">http://localhost:55169/run?command=turn%20y%201%2090</a></div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>$ wget <a href="http://localhost:55169/run?command=turn y 1 90" class="">http://localhost:55169/run?command=turn%20y%201%2090</a></div><div class=""><br class=""></div><div class="">I guess you are able to have your input devices run a shell command.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Tom</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 30, 2015, at 11:07 AM, Dougherty, Matthew T <<a href="mailto:matthewd@bcm.edu" class="">matthewd@bcm.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" class="">
<div class="">
Under C1 accelerators and some other USB HID activity require the cursor to be on a graphics window. An exception would be the mouse or keyboard interacting with other gui windows such as button pushes or entering file names.<br class="">
<br class="">
For C2 it would be good to have a dedicated input channel independent of the cursor position like the 3dconnexion. The general trend I see with researchers is dual display. One handles graphics and the other gui controls. This gets tricky when s3d is used
and the cursor. Is not exactly what. you think (2 visible cursors one active the other inactive)<br class="">
<br class="">
I manage this now with a dedicated chimera extension user gui buttons that rearrange the screens; and with controller mate I can have preconfigured-window-gui-location accelerator commands sent to activate the buttons, at the same time controller mate can set
cursor positions and do button pushes. Works for Mac, not an option for PC or Linux.<br class="">
<br class="">
I guess I could set a frame trigger and check a dedicated tcp port, but I am hesitant creating a kludge, because of the underlying strategic design issue and messing with the event loop.<br class="">
<br class="">
Matthew Dougherty<br class="">
National Center for Macromolecular Imaging<br class="">
Baylor College of Medicine<br class="">
=================================================<br class="">
=================================================<br class="">
</div>
_______________________________________________<br class="">Chimera-dev mailing list<br class=""><a href="mailto:Chimera-dev@cgl.ucsf.edu" class="">Chimera-dev@cgl.ucsf.edu</a><br class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev<br class=""></div></blockquote></div><br class=""></div></body></html>