View source for NIDE/NIDED
From Openmoko
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Return to NIDE/NIDED.
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Return to NIDE/NIDED.
NIDE/NIDED is a client/server application that emulates virtual input device through the network. With that you may transform your freerunner in a virtual keyboard/mouse to control a remote Linux Box and do other nice things. It's similar to Remoko, but uses a different tecnique.
NIDE is the client part of the architecture, it's a GUI that show you the virtual device (keyboard, mouse, etc), and recognizes your input actions:
If the input action matches some rules in the configuration file it:
The NIDED daemon create a virtual keyboard/mouse registering a new device in "uinput", reads command sent by NIDE, translates and inijects them in the system or execute remote applications.
Create a file in /usr/share/nide/devices with extension ".cfg". It's an xml file, the following example should be autoexplaining:
<xml> <page name="default"> <portrait vsizex="5" vsizey="5" vslidex="2" vslidey="2" stylesheet="/usr/share/nide/styles/freerunnert.style" iconpath="/usr/share/nide/icons" > <key uinputcode="1" x="0" y="0" width="3" height="3" icon="application-exit.png"/> <key uinputcode="10" x="0" y="0" width="2" height="1" text="Esc"/> <key uinputcode="2" x="1" y="1" width="1" height="1" text="1" stext="!" atext="¹" satext="¡"/> <key x="0" y="6" text="remote commands" width="3" height="3" gotopage="commands"/> <mouse x="3" y="0" width="3" height="4"/> <hwkey keycode="177" uinputcode="28"/> <slide x1="0" y1="0" x2="1" y2="1" localcommand="shutdown -r now"/> </portrait> </page> <page name="commands"> <portrait vsizex="1" vsizey="5"> <key gotopage="default" x="0" y="0" text="return"/> <key x="0" y="3" text="reboot" command="reboot" gotopage="default"/> <key x="0" y="4" text="halt" command="halt" gotopage="default"/> </portrait> </page>
uinputcode is the linux input key code, you can find it in /usr/include/linux/input.h, stext, atext, and satext are shift text, alt text, and shift alt texts. Nide has internal shift/altgr modifiers to handle them, simply add a key with the right uinput code.
Mouse create a virtual mouse, use the right key codes to create button left, right and middle, hwkey is hardware buttons, on the freerunner you may use aux and power.
Slide add a sliding gestures from (x1,y1) to (x2,y2), these coordinates ranges in 0<->vslidex-1, 0<->vslidey-1