New answers tagged

2

There are a couple of issues. The floating-point arithmetic could result in a point close to (0, 0) without being equal to (0, 0). Use Chop. The Abort happens after pt is updated in EventHandler . So sequence of events is Press key. Update to (0, 0) (actually, really close to (0, 0)). Not (0, 0), so continue. Press key again. Update to not (0, 0). Not ...


4

Shortly, use a SelectorPane and hide EventHandler as soon as the condition is met: pt = {0, .05}; pane = "dynamic"; graphics = Framed[Graphics[ {{Red, Disk[Dynamic[pt], .1]}}, PlotRange -> 1, Axes -> True] ]; eh = EventHandler[#, { "LeftArrowKeyDown" :> (pt -= {0.05, 0}; check@pt), "RightArrowKeyDown" :> (pt += {0.05, 0}; ...


2

This has been bugging non stop so I wanted to create a somewhat viable solution for Windows using autohotkey. Run the following as an Administrator in autohotkey on Windows. down=0 e:: if(down=0){ FileDelete, C:\Test.txt FileAppend, Down.`n, C:\Test.txt down=1 } return e Up:: Send e FileDelete, C:\Test.txt ...



Top 50 recent answers are included