Jump to content

Capture mouse pointer


Guest Micru

Recommended Posts

While using virtualbox i discovered a great feature: capture mouse pointer. It works as follows:

- Passing the mouse over the window has no effect on the window

- On click over the window, the pointer in the window becomes active and it is enclosed inside the window

- On pressing a hotkey (in this case Right Ctrl), the mouse pointer can travel again outside the window boundaries

 

I think it would be amazing to have something like that in gemrb. When I execute in windowed mode (always), it is annoying to scroll...

 

What do you think?

Link to comment

I don't think you're asking about this, but press scroll lock to lock the scrolling, err prevent the mouse from leaving the window.

 

Activation on click can go against what the user ordered the WM to behave like (I have it set so the focus follows the mouse).

Link to comment

You mean the key "scroll lock"? In my whole life I never pressed that button. I'll clean the dust from that button, and I'll give it a go this afternoon. It can be what I've been dreaming about :-)

Link to comment

surely it does, check the fn level, it's under home on mine.

 

Hi Lynx, thanks for the reply. I went through the keyboard three times now and cannot find a "Scroll Lock" :( seriously there is no such button on this laptop.

 

Is there a way to remap it? Must it be done in the source files? If so any idea where I could start looking?

Link to comment

unless you have a mac you almost certainly have scroll lock. did you even try holding the fn key and pressing buttons on the right side of the keyboard until you find wich one it is.

 

unfortunately last time i checked those keys are hard coded. you can of course recompile yourself using a different value.

Link to comment

unless you have a mac you almost certainly have scroll lock. did you even try holding the fn key and pressing buttons on the right side of the keyboard until you find wich one it is.

 

unfortunately last time i checked those keys are hard coded. you can of course recompile yourself using a different value.

 

I am positive I do not have a "Scroll Lock" key :)

 

7106411911_406c7ff2d8_s.jpg

 

See, the blue writing is for the function "Fn" key. I only have those on top over the F1-F12 keys :(

 

Other people on the net missing the "Scroll Lock" key: http://en.community....3/20044355.aspx

 

I am looking to change the key in the source code but my knowledge of c++ is limited so any pointers as to which file to look at will be most appreciated.

 

EDIT:

Managed to get all the dependencies installed and successfully compiled it on ubuntu 12.04. Now to find the location in the source... But it is turning out to be great fun ;)

 

EDIT2:

Jippeeeeeeee found it :D!

 

change line 348 of the file /src/gemrb-0.7.0/gemrb/plugins/SDLVideo/SDLVideo.cpp to any of these values not used currently: http://www.libsdl.org/docs/html/sdlkey.html

 

I changed mine to "SDLK_INSERT" Now my "Insert" button (which I luckily do have) does for me what the "Scroll Lock" button does for others.

 

just "make -j2" and then "sudo make install".

 

Evil beware!

 

P.S. This wouldn't have been possible if it was BGEE...

P.S.S. Thanks all who are busy making this excellent app!

Link to comment

Great, I see you're an adventurer. :) It shows that we still haven't externalised all the keyboard shortcuts.

Well, this is different from functional hotkeys.

This is kinda replacing one SDLK constant with another, a global remapping of a key.

In other word, this isn't possible in our current code.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...