NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: amd-64 NetBSD9: Get laptop keyboard functions to work



Hi.

Only the audio keys were detected. Screen brightness and Wireless were not read.

Thanks
On Friday, 7 August 2020, 17:44:47 GMT+12, Martin Husemann <martin%duskware.de@localhost> wrote:


On Fri, Aug 07, 2020 at 03:38:51AM +0000, Ahi Brown wrote:

>  I would like to bind the brightness keys to 'xrandr'.


First you have to find out if the key generates a key press/release event
for the normal keyboard - that is not always the case (e.g. some notebooks
require special ACPI key drivers to make the events available).

To check, run xev and press the key. You should get something like:

KeyPress event, serial 37, synthetic NO, window 0x3000001,
    root 0x3c4, subw 0x0, time 2350058, (173,63), root:(724,481),
    state 0x0, keycode 146 (keysym 0x1000ff14, apRepeat), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x3000001,
    root 0x3c4, subw 0x0, time 2350318, (173,63), root:(724,481),
    state 0x0, keycode 146 (keysym 0x1000ff14, apRepeat), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

... but probably (if you get anything at all) with a 0 keysum.

If you get this, you can use xmodmap to bind a keysym and probably teach your
window manager to map that keysym to some action.

If you do not get anything, some ACPI binding will be needed (and I have never
looked at those).

Martin



Home | Main Index | Thread Index | Old Index