Page 1 of 1

Mouse and Keyboard cooperation

PostPosted: Fri Dec 31, 2010 2:25 pm
by red
I can't seem to work this out.
When I press any key my mouse totally freezes and it moves again after the key is released.

I'm using magic_hooks and as far as the queue goes I tried something like that:
Code: Select all
@queue.peek_each do |event|
­   handle event
end
@queue.each do |ev|
­   @Player.handle ev
end

where the Player class handles all the things that I'd like to be able to do while moving the mouse.

self in this case is my "Game" class where I have hooks for MouseMovedTrigger and KeyPressTrigger with KeyReleaseTrigger for the arrows.
General KeyPressTrigger and KeyReleaseTrigger hooks are in the @Player Class.

Re: Mouse and Keyboard cooperation

PostPosted: Fri Dec 31, 2010 3:55 pm
by red
strangely enough this problem only occurs when using touchpad. Mouse can move the cursor. Maybe some problem with the touchpad's drivers =\
Major letdown because I have to juggle my mouse between PC and laptop.

(i'm such an idiot lol. It was a default option in my mouse settings)