LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Re: Keymappings (I think)

[ILUG] Re: Keymappings (I think)

John P. Looney jplooney at compapp.dcu.ie
Wed Jun 30 17:20:15 IST 1999


On Wed, Jun 30, 1999 at 03:50:30PM +0100, Liam Bedford mentioned:
> I just noticed something. I'm running mandrake with KDE at the moment.
> When I run netscape, the Wheel works (scrolls up and down). If I turn
> on Num Lock, it doesn't. If I turn Num Lock off again, it starts working
> again. Anyone got any ideas? I had thought it was just netscape forgetting
> that the mouse should scroll (it does that as well sometimes).
 
 That's just a shitty application. In X, the num lock being down is stored
in the "state" part of an XEvent struct. Most applications look for
something like:

 if(event.xbutton.key==Button_1 && event->state==XK_Shift) {
    you got a shift-click
 } else if (event.xbutton.key==Button_4 && event->state==0) {
    you got a scroll down
 }

 The correct thing to do would be something like 

 } else if (event.xbutton.key==Button_4 && (!(event->state & XK_Ctrl))) {

 if you wanted to make sure that you don't do stuff when ctrl is pressed.

 FVWM used to have this sort of bug a lot, as does xspim.

Kate

-- 
Microsoft - the best reason in the world to drink beer




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell