From: Ian Jackson Date: Fri, 31 Dec 2010 15:44:54 +0000 (+0000) Subject: gui: change button for sel train, forward/reverse X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=c8b6d90e8ee346fd0a6899451a76363a465676a5;p=trains.git gui: change button for sel train, forward/reverse --- diff --git a/hostside/gui b/hostside/gui index d57df68..995ad76 100755 --- a/hostside/gui +++ b/hostside/gui @@ -663,9 +663,6 @@ proc ib-evcmd/ebwikeb {devid target} { proc ib-ev/ebwikeb/EV_REL/REL_WHEEL {devid value} { ib-ev/wheelmouse/EV_REL/REL_WHEEL $devid $value } -proc ib-ev/ebwikeb/EV_KEY/BTN_RIGHT {devid value} { - ib-changedirection $devid $value -} proc ib-ebwikeb-modifier {devid value bitval} { upvar #0 input/${devid}(modifiers) mod @@ -692,7 +689,13 @@ proc ib-ev/ebwikeb/EV_KEY/KEY_CAPSLOCK {devid value} { } proc ib-ev/ebwikeb/0xffbc_88/0xffbc_0d {devid value} { - ib-selectnext $devid $value + upvar #0 input/$devid in + if {!$value} return + if {$in(modifiers) & 0x00ff} { + ib-selectnext $devid $value + } else { + ib-changedirection $devid $value + } } proc ib-ev/ebwikeb/EV_KEY/KEY_BOOKMARKS {devid value} {