Re: [Haskell-cafe] ANN: Robot - Simulate keyboard and mouse events under X11

2013-05-14 Thread Niklas Hambüchen
Ah OK. Thank you again for the fast fixes! On Tue 14 May 2013 11:44:43 SGT, Chris Wong wrote: I removed the functionality because I didn't really see a use for it anymore. The `hold` and `tap` functions are already exception safe (thanks to `bracket`), and anyone who uses the unguarded

Re: [Haskell-cafe] ANN: Robot - Simulate keyboard and mouse events under X11

2013-05-13 Thread Chris Wong
Oh, I see now. I originally made the runRobot functions reset the input state when the Robot finished running. That worked well for my use case (testing GUIs), but as you have noticed, it causes unintuitive behavior when runRobot is called at a high frequency. In hindsight, that was a design flaw

Re: [Haskell-cafe] ANN: Robot - Simulate keyboard and mouse events under X11

2013-05-13 Thread Niklas Hambüchen
Awesome, that works very well, and it even made my program run faster / with less CPU. The reset functionality is useful, but I think optional is better. Did you remove it entirely or is it still available? On Tue 14 May 2013 08:25:04 SGT, Chris Wong wrote: Oh, I see now. I originally made

Re: [Haskell-cafe] ANN: Robot - Simulate keyboard and mouse events under X11

2013-05-13 Thread Chris Wong
I removed the functionality because I didn't really see a use for it anymore. The `hold` and `tap` functions are already exception safe (thanks to `bracket`), and anyone who uses the unguarded `press` function probably wants to keep it held down anyway. Chris On Tue, May 14, 2013 at 12:46 PM,

Re: [Haskell-cafe] ANN: Robot - Simulate keyboard and mouse events under X11

2013-05-12 Thread Chris Wong
On Thu, May 9, 2013 at 1:36 PM, Chris Wong chrisyco+haskell-c...@gmail.com wrote: On Thu, May 9, 2013 at 4:47 AM, Niklas Hambüchen m...@nh2.me wrote: Hi, I just started using your library to move my cursor. Is it possible that it ignores negative values in moveBy? In other words, I can

Re: [Haskell-cafe] ANN: Robot - Simulate keyboard and mouse events under X11

2013-05-12 Thread Niklas Hambüchen
Yes, that works now. I have another problem though: I move the cursor at high resolution (128 Hz) and it seems that when robot issues a command to X, it disables (keyboard) state so far. This means that it's impossible for me to Ctrl-C my program: Only c is sent all the time, me pressing Ctrl

Re: [Haskell-cafe] ANN: Robot - Simulate keyboard and mouse events under X11

2013-05-12 Thread Chris Wong
On Sun, May 12, 2013 at 8:46 PM, Niklas Hambüchen m...@nh2.me wrote: Yes, that works now. Excellent! I have another problem though: I move the cursor at high resolution (128 Hz) and it seems that when robot issues a command to X, it disables (keyboard) state so far. This means that it's

Re: [Haskell-cafe] ANN: Robot - Simulate keyboard and mouse events under X11

2013-05-12 Thread Niklas Hambüchen
Can you show me the code that triggers that behavior? It is basically Just connection - connect forever $ do (x,y) - getGyroMovement runRobotWithConnection (moveBy x y) connection ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] ANN: Robot - Simulate keyboard and mouse events under X11

2013-05-09 Thread Tobias Dammers
On Thu, May 09, 2013 at 01:36:52PM +1200, Chris Wong wrote: On Tue, May 7, 2013 at 5:18 AM, Jeanne-Kamikaze jeannekamik...@gmail.com wrote: Looks like an interesting library. Will it be able to read pixels from a window at some point? Not sure -- I have no idea how screen capturing

Re: [Haskell-cafe] ANN: Robot - Simulate keyboard and mouse events under X11

2013-05-08 Thread Niklas Hambüchen
Hi, I just started using your library to move my cursor. Is it possible that it ignores negative values in moveBy? In other words, I can only move the cursor into one direction. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] ANN: Robot - Simulate keyboard and mouse events under X11

2013-05-08 Thread Chris Wong
On Thu, May 9, 2013 at 4:47 AM, Niklas Hambüchen m...@nh2.me wrote: Hi, I just started using your library to move my cursor. Is it possible that it ignores negative values in moveBy? In other words, I can only move the cursor into one direction. I did some research, and traced this to a

Re: [Haskell-cafe] ANN: Robot - Simulate keyboard and mouse events under X11

2013-05-06 Thread Jeanne-Kamikaze
Looks like an interesting library. Will it be able to read pixels from a window at some point? On 23 April 2013 06:02, Chris Wong chrisyco+haskell-c...@gmail.com wrote: I'm pleased to announce the initial release of Robot! Robot lets you send fake keyboard and mouse events, just like its