Spurious key events -- keycode 248?

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
justinfoote

Spurious key events -- keycode 248?

Post by justinfoote »

Hey all,

I have a lenovo thinkpad Z470 running mint 12. For some reason, it's getting spurious key events. That is, when I'm not pressing any keys or moving the mouse at all, these two events show up every 28 seconds in xev:

Code: Select all

KeyPress event, serial 33, synthetic NO, window 0x1a00001,
    root 0xae, subw 0x0, time 1079394, (729,130), root:(730,177),
    state 0x0, keycode 248 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x1a00001,
    root 0xae, subw 0x0, time 1079394, (729,130), root:(730,177),
    state 0x0, keycode 248 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
It's more annoying than you might think. While I'm reading anything on the computer, the screen goes dim (because it's idle), then bright (because of the key press/release), then dim, then bright. It also makes it impossible to scroll up in a terminal, because every 28 seconds it returns to the bottom because it caught a key press. And if it happens while I'm clicking and dragging (with the tap, tap, slide gesture), it causes me to drop whatever I was dragging.

I've tracked it down this far, but I don't know what to do from here. Anyone have any ideas about finding their source?
What's keycode 248 used for? I thought it was outside the range of keycodes.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
justinfoote

Re: Spurious key events -- keycode 248?

Post by justinfoote »

I realize this was a pretty weird problem, but in case anyone else runs into it, I've found a solution.

I never did figure out why exactly the event was getting fired, but I did at least find the key that corresponds to keycode 248 -- it's Fn + F4, which is supposed to start the 'lenovo screen resolution settings manager', which must be some pre-installed nonsense in their windows distribution.

Anyway, I found a great alternative to xev, called evtest. It let me see that the screen resolution button wasn't part of the normal keyboard device, it's part of the 'Ideapad extra buttons' device. There are only three keys there, and none of them seemed useful to me, so I just disabled that device in xorg.conf, like this:

Code: Select all

Section "InputClass"
	Identifier "disable stupid lenovo keys"
	MatchProduct "Ideapad extra buttons"
	Option "Ignore" "on"
EndSection
Problem solved.
Locked

Return to “Hardware Support”