1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
|
<?xml version="1.0"?>
<GOK:accessmethodroot xmlns:GOK="http://www.gnome.org/GOK">
<!-- User interface for the access method -->
<GOK:accessmethod name="keyautoscanning" _displayname="Single Key Automatic Scanning">
<_GOK:description xml:space="preserve">Press a switch to start scanning. Press another switch or the same switch again to select.</_GOK:description>
<GOK:operation>
<GOK:control type="frame" size="3" spacing="0" border="0" _string="Operation">
<GOK:control type="hbox" size="1" spacing="0" border="0">
<GOK:control type="vbox" size="3" border="5" spacing="10">
<GOK:control type="hbox" size="2" spacing="5" border="0">
<GOK:control type="label" _string="Start scanning:" />
<GOK:control name="movehighlighter" _string="Start Scanning:" type="combobox" fillwith="actions" qualifier="switch+mousebutton" />
</GOK:control>
<GOK:control type="hbox" size="2" spacing="5" border="0">
<GOK:control type="label" _string="Activate:" />
<GOK:control name="select" _string="Activate:" type="combobox" fillwith="actions" qualifier="switch+mousebutton" />
</GOK:control>
</GOK:control>
</GOK:control>
</GOK:control>
</GOK:operation>
<GOK:feedback>
<GOK:control type="frame" size="3" spacing="0" border="0" _string="Feedback">
<GOK:control type="hbox" size="1" spacing="0" border="0">
<GOK:control type="vbox" size="3" border="5" spacing="10">
<GOK:control type="hbox" size="2" border="0" spacing="5">
<GOK:control type="label" _string="Movement:" />
<GOK:control name="feedbackmovement" _string="Feedback Movement:" type="combobox" fillwith="feedbacks" />
</GOK:control>
<GOK:control type="hbox" size="2" border="0" spacing="5">
<GOK:control type="label" _string="Activation:" />
<GOK:control name="feedbackselection" _string="Feedback Activation:" type="combobox" fillwith="feedbacks" />
</GOK:control>
</GOK:control>
</GOK:control>
</GOK:control>
</GOK:feedback>
<GOK:options>
<GOK:control type="frame" size="3" spacing="0" border="0" _string="Options">
<GOK:control type="vbox" size="2" border="0" spacing="5">
<GOK:control type="hbox" size="1" border="0" spacing="5">
<GOK:control type="label" _string="Scan Delay:" />
<GOK:control name="scanspeed" type="spinbutton" _string="Scan Speed:" value="100" min="10" max="500" stepincrement="1" pageincrement="10" pagesize="10" />
</GOK:control>
<GOK:control type="hbox" size="1" border="0" spacing="5">
<GOK:control type="label" _string="Initial Delay:" />
<GOK:control name="initialdelay" type="spinbutton" _string="Initial Delay:" value="0" min="0" max="500" stepincrement="1" pageincrement="10" pagesize="10" />
</GOK:control>
<GOK:control type="hbox" size="2" border="5" spacing="20">
<GOK:control name="wrap" type="checkbutton" _string="Wrap" />
</GOK:control>
<GOK:control type="hbox" size="3" border="5" spacing="20">
<GOK:control type="label" _string="Scanning Direction:" />
<GOK:control type="hbox" size="2" border="0" spacing="5">
<GOK:control name="topbottom" type="radiobutton" _string="Top/Bottom" value="0" groupstart="yes"/>
<GOK:control name="topbottom" type="radiobutton" _string="Bottom/Top" value="1" />
</GOK:control>
<GOK:control type="hbox" size="2" border="0" spacing="5">
<GOK:control name="leftright" type="radiobutton" _string="Left/Right" value="0" groupstart="yes"/>
<GOK:control name="leftright" type="radiobutton" _string="Right/Left" value="1" />
</GOK:control>
</GOK:control>
<GOK:control type="hbox" size="2" border="5" spacing="10">
<GOK:control name="cyclenumber" type="label" _string="Cycles Before Stopping:" />
<GOK:control name="cycles" type="spinbutton" _string="Cycles Before Stopping:" value="3" min="1" max="10" stepincrement="1" pageincrement="3" pagesize="3" />
</GOK:control>
<!-- <GOK:control type="hbox" size="2" border="5" spacing="10">
<GOK:control name="autostart" type="radiobutton" _string="Autostart (starts automatically)" value="0" groupstart="yes"/>
<GOK:control name="autostart" type="radiobutton" _string="Press switch to start" value="1" />
</GOK:control> -->
</GOK:control>
</GOK:control>
</GOK:options>
<!-- Rates for this access method. -->
<GOK:rate name="movehighlighter" stringvalue="switch1" />
<GOK:rate name="select" stringvalue="switch3" />
<GOK:rate name="feedbackmovement" stringvalue="" />
<GOK:rate name="feedbackselection" stringvalue="key_flashing" />
<GOK:rate name="autorepeat" value="0" />
<GOK:rate name="repeatrate" value="30" />
<GOK:rate name="scanspeed" value="100" />
<GOK:rate name="wrap" value="1" />
<GOK:rate name="topbottom" value="0" />
<GOK:rate name="leftright" value="0" />
<GOK:rate name="cycles" value="3" />
<GOK:rate name="continuouscycle" value="0" />
<GOK:rate name="autostart" value="0" />
<GOK:rate name="initialdelay" value="0" />
<!-- Initialization for the access method. -->
<GOK:initialization>
<GOK:effect call="ChunkerReset" />
<GOK:effect call="ChunkerChunkKeys" param1="topbottom" param2="leftright" />
</GOK:initialization>
<!-- wait for an action to start the scanning -->
<GOK:state name="0">
<GOK:handler name="movehighlighter">
<GOK:effect call="StateNext" />
</GOK:handler>
</GOK:state>
<!-- Scan the chunks (keys) -->
<GOK:state name="1">
<GOK:stateinit>
<GOK:effect call="HighlightFirstChunk" />
<GOK:effect call="CounterSet" param1="1" param2="cycles" />
<GOK:effect call="Feedback" name="feedbackmovement" />
<GOK:effect call="Timer1Set" name="scanspeed+initialdelay" />
</GOK:stateinit>
<GOK:handler name="timer1">
<!-- move the key highlighter -->
<GOK:effect call="Timer1Set" name="scanspeed" />
<GOK:effect call="Feedback" name="feedbackmovement" />
<GOK:effect call="Timer1Set" name="scanspeed" />
<GOK:effect call="ChunkerIfNextChunk">
<GOK:compare type="equal" value="1">
<GOK:true>
<GOK:effect call="ChunkerNextChunk" />
</GOK:true>
<GOK:false>
<!-- is this the last cycle? -->
<GOK:effect call="CounterDecrement" param1="1" />
<GOK:effect call="CounterGet" param1="1" >
<GOK:compare type="equalorlessthan" value="0">
<GOK:true>
<GOK:effect call="Timer1Stop" />
<GOK:effect call="UnhighlightAll" />
<GOK:effect call="StateJump" param1="0" />
</GOK:true>
<GOK:false>
<GOK:effect call="GetRate" name="wrap">
<GOK:compare type="equal" value="1">
<GOK:true>
<GOK:effect call="ChunkerWrapFirstChunk" />
</GOK:true>
</GOK:compare>
</GOK:effect>
</GOK:false>
</GOK:compare>
</GOK:effect>
</GOK:false>
</GOK:compare>
</GOK:effect>
</GOK:handler>
<GOK:handler name="select">
<GOK:effect call="Timer1Stop" />
<GOK:effect call="SelectChunk" >
<GOK:compare type="equal" value="1">
<GOK:true>
<GOK:effect call="Feedback" name="feedbackselection" />
<GOK:effect call="OutputSelectedKey" />
<GOK:effect call="StateJump" param1="0" />
</GOK:true>
<GOK:false>
<GOK:effect call="StateNext" />
</GOK:false>
</GOK:compare>
</GOK:effect>
</GOK:handler>
<GOK:handler name="movehighlighter">
<GOK:effect call="Timer1Stop" />
<GOK:effect call="SelectChunk" >
<GOK:compare type="equal" value="1">
<GOK:true>
<GOK:effect call="Feedback" name="feedbackselection" />
<GOK:effect call="OutputSelectedKey" />
<GOK:effect call="StateJump" param1="0" />
</GOK:true>
<!-- <GOK:false>
<GOK:effect call="StateNext" />
</GOK:false> -->
</GOK:compare>
</GOK:effect>
</GOK:handler>
</GOK:state>
<!-- For repeat state choose a handler for turning repeat off. -->
<GOK:state name="repeat">
<GOK:handler name="select">
<GOK:effect call="StateReset" name="repeat:state-reset" />
<GOK:effect call="UnhighlightAll" name="repeat:unhighlight-all" />
<GOK:effect call="Timer1Stop" />
<GOK:effect call="Feedback" name="feedbackselection" />
<GOK:effect call="StateJump" param1="0" />
</GOK:handler>
<GOK:handler name="movehighlighter" state="press">
<GOK:effect call="StateReset" name="repeat:state-reset" />
<GOK:effect call="UnhighlightAll" name="repeat:unhighlight-all" />
<GOK:effect call="Timer1Stop" />
<GOK:effect call="Feedback" name="feedbackselection" />
<GOK:effect call="StateJump" param1="0" />
</GOK:handler>
</GOK:state>
</GOK:accessmethod>
</GOK:accessmethodroot>
|