Code Monkey home page Code Monkey logo

Comments (4)

Muhammad95959 avatar Muhammad95959 commented on June 8, 2024 1

Man you are a legend
That did work
Thank you for your help

from interception-vimproved.

maricn avatar maricn commented on June 8, 2024

Hi there, thanks for the question, I can try to help you investigate.
Are you using those keycodes through another (maybe physical) keyboard?
Are you maybe accidentally mapping the same trigger keys (backslash + C or X) to some other action?
Are the target keys (brightnessup brightnessdown) surely changing your brightness?
Could you post a minimal relevant output of https://git.sr.ht/~sircmpwn/wev while pressing that combination?

from interception-vimproved.

Muhammad95959 avatar Muhammad95959 commented on June 8, 2024

First of all thanks for the response
I'm not sure about what you are referring to here:

Are you using those keycodes through another (maybe physical) keyboard?

But this is my yaml file for udevmon:

- JOB: "intercept -g $DEVNODE | interception-vimproved /etc/interception-vimproved/config.yaml | uinput -d $DEVNODE"
  DEVICE:
    NAME: ".*((k|K)(eyboard|EYBOARD)|TADA68).*"

and this is my entire config:

- intercept: KEY_CAPSLOCK
  ontap: KEY_ESC
  onhold: KEY_LEFTCTRL

- intercept: KEY_TAB
  onhold:

  # alternative syntax
  - {from: KEY_D, to: KEY_DELETE}
  - {from: KEY_SLASH, to: KEY_BACKSLASH}
  - {from: KEY_T, to: KEY_TAB}

  # vim home row
  - {from: KEY_H, to: KEY_LEFT}
  - {from: KEY_J, to: KEY_DOWN}
  - {from: KEY_K, to: KEY_UP}
  - {from: KEY_L, to: KEY_RIGHT}

  # vim above home row
  - {from: KEY_Y, to: KEY_HOME}
  - {from: KEY_U, to: KEY_PAGEDOWN}
  - {from: KEY_I, to: KEY_PAGEUP}
  - {from: KEY_O, to: KEY_END}

  # number row, to F keys
  - {from: KEY_1, to: KEY_F1}
  - {from: KEY_2, to: KEY_F2}
  - {from: KEY_3, to: KEY_F3}
  - {from: KEY_4, to: KEY_F4}
  - {from: KEY_5, to: KEY_F5}
  - {from: KEY_6, to: KEY_F6}
  - {from: KEY_7, to: KEY_F7}
  - {from: KEY_8, to: KEY_F8}
  - {from: KEY_9, to: KEY_F9}
  - {from: KEY_0, to: KEY_F10}
  - {from: KEY_MINUS, to: KEY_F11}
  - {from: KEY_EQUAL, to: KEY_F12}

  # xf86 audio
  - {from: KEY_M, to: KEY_MUTE}
  - {from: KEY_COMMA, to: KEY_VOLUMEDOWN}
  - {from: KEY_DOT, to: KEY_VOLUMEUP}

  # xf86 brightness
  - {from: KEY_C, to: KEY_BRIGHTNESSUP}
  - {from: KEY_X, to: KEY_BRIGHTNESSDOWN}

- intercept: KEY_BACKSLASH
  onhold:

  # alternative syntax
  - {from: KEY_D, to: KEY_DELETE}
  - {from: KEY_SLASH, to: KEY_BACKSLASH}
  - {from: KEY_T, to: KEY_TAB}

  # vim home row
  - {from: KEY_H, to: KEY_LEFT}
  - {from: KEY_J, to: KEY_DOWN}
  - {from: KEY_K, to: KEY_UP}
  - {from: KEY_L, to: KEY_RIGHT}

  # vim above home row
  - {from: KEY_Y, to: KEY_HOME}
  - {from: KEY_U, to: KEY_PAGEDOWN}
  - {from: KEY_I, to: KEY_PAGEUP}
  - {from: KEY_O, to: KEY_END}

  # number row, to F keys
  - {from: KEY_1, to: KEY_F1}
  - {from: KEY_2, to: KEY_F2}
  - {from: KEY_3, to: KEY_F3}
  - {from: KEY_4, to: KEY_F4}
  - {from: KEY_5, to: KEY_F5}
  - {from: KEY_6, to: KEY_F6}
  - {from: KEY_7, to: KEY_F7}
  - {from: KEY_8, to: KEY_F8}
  - {from: KEY_9, to: KEY_F9}
  - {from: KEY_0, to: KEY_F10}
  - {from: KEY_MINUS, to: KEY_F11}
  - {from: KEY_EQUAL, to: KEY_F12}

  # xf86 audio
  - {from: KEY_M, to: KEY_MUTE}
  - {from: KEY_COMMA, to: KEY_VOLUMEDOWN}
  - {from: KEY_DOT, to: KEY_VOLUMEUP}

  # xf86 brightness
  - {from: KEY_C, to: KEY_BRIGHTNESSUP}
  - {from: KEY_X, to: KEY_BRIGHTNESSDOWN}

  # # mouse navigation
  # - {from: BTN_LEFT, to: BTN_BACK}
  # - {from: BTN_RIGHT, to: BTN_FORWARD}

everything in there is working very well except for the brightness
I'm using xorg so this is the output of xev when hitting the actual brightness up and down keys:

FocusOut event, serial 31, synthetic NO, window 0x3400001,
    mode NotifyGrab, detail NotifyAncestor

FocusOut event, serial 31, synthetic NO, window 0x3400001,
    mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 31, synthetic NO, window 0x3400001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 31, synthetic NO, window 0x0,
    keys:  117 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

FocusOut event, serial 31, synthetic NO, window 0x3400001,
    mode NotifyGrab, detail NotifyAncestor

FocusOut event, serial 31, synthetic NO, window 0x3400001,
    mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 31, synthetic NO, window 0x3400001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 31, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

and it doesn't output anything after pressing { KEY_TAB , KEY_BACKSLASH } + { KEY_BRIGHTNESSUP , KEY_BRIGHTNESSDOWN }

from interception-vimproved.

maricn avatar maricn commented on June 8, 2024

If you run sudo uinput -p -d /dev/input/by-id/$MY_KBD_INPUT_ID > my-kbd.yaml (ofc replace $MY_KBD_INPUT_ID with the keyboard you're testing with), and then inspect the my-kbd-yaml file, do you find KEY_BRIGHTNESSUP and KEY_BRIGHTNESSDOWN among the supported keys?

If not, could you try to add those keys there and then change your udevmon config from:

- JOB: "intercept -g $DEVNODE | interception-vimproved /etc/interception-vimproved/config.yaml | uinput -d $DEVNODE"
  DEVICE:
    NAME: ".*((k|K)(eyboard|EYBOARD)|TADA68).*"

to:

- JOB: "intercept -g $DEVNODE | interception-vimproved /etc/interception-vimproved/config.yaml | uinput -c /path/to/my-kbd.yaml"
  DEVICE:
    NAME: ".*((k|K)(eyboard|EYBOARD)|TADA68).*"

(where you need to fix the /path/to/my-kbd.yaml which fakes support for brightness up and down keys)

Let me know if something appears now in xev output and good luck.

from interception-vimproved.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.