Triple-tap Keys
Posted: Sat Jul 05, 2008 12:50 am
Has anyone made a plugin that does Triple-tap Keys like x10commander.
http://thegreenbutton.com/forums/1/4767 ... hread.aspx
http://thegreenbutton.com/forums/1/4767 ... hread.aspx
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1446">
<Folder Name="Triple-Tap Keys">
<Macro Name="Prepare TTK">
<Event Name="Main.OnInit" />
<Action>
EventGhost.PythonCommand(u'ttk_key= " "')
</Action>
<Action>
EventGhost.PythonCommand(u'taps = 0')
</Action>
<Action>
EventGhost.NewJumpIf(XmlIdLink(156), 2, True)
</Action>
<Action>
Timer.TimerAction(u'ttk', 0, 1, 1.0, u'ttk', False, True, 1, u'00:00:00')
</Action>
<Action>
EventGhost.Wait(1.1000000000000001)
</Action>
<Action>
EventGhost.FlushEvents()
</Action>
</Macro>
<Macro Name="Get input">
<Event Name="DesktopRemote.1" />
<Event Name="DesktopRemote.2" />
<Event Name="DesktopRemote.3" />
<Event Name="DesktopRemote.4" />
<Event Name="DesktopRemote.5" />
<Event Name="DesktopRemote.6" />
<Event Name="DesktopRemote.7" />
<Event Name="DesktopRemote.8" />
<Event Name="DesktopRemote.9" />
<Event Name="DesktopRemote.0" />
<Action>
EventGhost.PythonCommand(u'taps = taps + 1')
</Action>
<Action>
EventGhost.PythonCommand(u'if taps > len(ttk[eg.event.string]) : taps = 1')
</Action>
<Action>
EventGhost.PythonCommand(u'ttk_key = ttk[eg.event.string][taps-1]')
</Action>
<Action>
EventGhost.ShowOSD(u'{ttk_key}', u'0;-32;0;0;0;700;0;0;0;0;3;2;1;34;Arial', (0, 202, 0), (0, 0, 0), 4, (0, 0), 0, 3.0, False)
</Action>
<Action>
Timer.TimerAction(u'ttk', 1, 1, 1.0, u'ttk-2-', True, True, 0, u'00:00:00')
</Action>
</Macro>
<Macro Name="Type key">
<Event Name="Timer.ttk" />
<Action>
EventGhost.PythonCommand(u'taps = 0')
</Action>
<Action>
EventGhost.ShowOSD(u'Selected key: {ttk_key}', u'0;-32;0;0;0;700;0;0;0;0;3;2;1;34;Arial', (0, 202, 0), (0, 0, 0), 4, (0, 0), 0, 3.0, False)
</Action>
</Macro>
<Folder Name="Shift">
<Folder Name="Shift a-z" id="155">
<Macro Name="Presets a-z" id="156">
<Action>
EventGhost.PythonCommand(u'ttk = { "DesktopRemote.1":(".", ",", "?", "!", "\'", "\\"", "1", "(", ")", "@", "/", ":", "_"), "DesktopRemote.2":("a", "b", "c", "2", u"\xe4"), "DesktopRemote.3":("d", "e", "f", "3"), "DesktopRemote.4":("g", "h", "i", "4"), "DesktopRemote.5":("j", "k", "l", "5"), "DesktopRemote.6":("m", "n", "o", "6", u"\xf6"), "DesktopRemote.7":("p", "q", "r", "s", "7", u"\xdf"), "DesktopRemote.8":("t", "u", "v", "8", u"\xfc"), "DesktopRemote.9":("w", "x", "y", "z", "9"), "DesktopRemote.0":(" ", "0") }')
</Action>
</Macro>
<Macro Name="Aktiviere exklusiv: Shift A-Z">
<Event Name="DesktopRemote.AV" />
<Action>
EventGhost.NewJumpIf(XmlIdLink(172), 2, True)
</Action>
<Action>
EventGhost.EnableExclusive(XmlIdLink(171))
</Action>
</Macro>
</Folder>
<Folder Name="Shift A-Z" id="171" Enabled="False">
<Macro Name="Presets A-Z" id="172">
<Action>
EventGhost.PythonCommand(u'ttk = { "DesktopRemote.1":(".", ",", "?", "!", "\'", "\\"", "1", "(", ")", "@", "/", ":", "_"), "DesktopRemote.2":("A", "B", "C", "2", u"\xc4"), "DesktopRemote.3":("D", "E", "F", "3"), "DesktopRemote.4":("G", "H", "I", "4"), "DesktopRemote.5":("J", "K", "L", "5"), "DesktopRemote.6":("M", "N", "O", "6", u"\xd6"), "DesktopRemote.7":("P", "Q", "R", "S", "7", u"\xdf"), "DesktopRemote.8":("T", "U", "V", "8", u"\xdc"), "DesktopRemote.9":("W", "X", "Y", "Z", "9"), "DesktopRemote.0":(" ", "0") }')
</Action>
</Macro>
<Macro Name="Aktiviere exklusiv: Shift 0-1">
<Event Name="DesktopRemote.AV" />
<Action>
EventGhost.NewJumpIf(XmlIdLink(188), 2, True)
</Action>
<Action>
EventGhost.EnableExclusive(XmlIdLink(187))
</Action>
</Macro>
</Folder>
<Folder Name="Shift 0-9" id="187" Enabled="False">
<Macro Name="Presets 0-9" id="188">
<Action>
EventGhost.PythonCommand(u'ttk = { "DesktopRemote.1":("1",), "DesktopRemote.2":("2",), "DesktopRemote.3":("3",), "DesktopRemote.4":("4",), "DesktopRemote.5":("5",), "DesktopRemote.6":("6",), "DesktopRemote.7":("7",), "DesktopRemote.8":("8",), "DesktopRemote.9":("9",), "DesktopRemote.0":("0",) }')
</Action>
</Macro>
<Macro Name="Aktiviere exklusiv: Shift a-z">
<Event Name="DesktopRemote.AV" />
<Action>
EventGhost.NewJumpIf(XmlIdLink(156), 2, True)
</Action>
<Action>
EventGhost.EnableExclusive(XmlIdLink(155))
</Action>
</Macro>
</Folder>
</Folder>
</Folder>
</EventGhost>