Forums Archived

The forums are being archived. See this topic for more information.

Mouse and Keyboard cooperation

Get help and support with Rubygame

Mouse and Keyboard cooperation

Postby red » Fri Dec 31, 2010 2:25 pm

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.
red
 
Posts: 7
Joined: Thu Dec 30, 2010 6:26 pm

Re: Mouse and Keyboard cooperation

Postby red » Fri Dec 31, 2010 3:55 pm

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)
red
 
Posts: 7
Joined: Thu Dec 30, 2010 6:26 pm


Return to Help & Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron