Giter Club home page Giter Club logo

Comments (9)

Fred-Vatin avatar Fred-Vatin commented on July 2, 2024 1

When kanata Windows hook version is running, navigation key codes skip the E0 and thus their code is detected as NumPad. (I guess).
image

When NumLock is active, most of the time, navigation keys still send navigation events to apps.
281836524-5095e80f-5c0f-49fa-bdbe-bd397f5a31da

But in some apps like windows emoji panel, whatsapp, etc., they send NumPad event and write numbers.

When kanata is not running, the navigation key codes are detected correctly.
Workaround is to disable numlock or using kanata wintercept variant that sends the right key codes.
image

It would be nice if it could be fixed in the Windows hook so it can send the right key codes, but I don’t know if it’s possible.

from kanata.

ShrykeWindgrace avatar ShrykeWindgrace commented on July 2, 2024 1

I would also like to point out that new winiov2 variants do not have this problem!

from kanata.

LGUG2Z avatar LGUG2Z commented on July 2, 2024

My defsrc:

(defsrc
  esc  f1   f2   f3   f4   f5   f6   f7   f8   f9   f10  f11  f12        f13  f14  f15   f16  f17  f18  f19
  102d 1    2    3    4    5    6    7    8    9    0    -    =    bspc  ins  home pgup  nlck clr  kp/  kp*
  tab  q    w    e    r    t    y    u    i    o    p    [    ]    ret   del  end  pgdn  kp7  kp8  kp9  kp-
  caps a    s    d    f    g    h    j    k    l    ;    '    \                          kp4  kp5  kp6  kp+
  lsft grv  z    x    c    v    b    n    m    ,    .    /    rsft            up         kp1  kp2  kp3  kprt
  lctl lalt lmet           spc                 rmet ralt      rctl       left down rght  kp0       kp.
)

from kanata.

jtroo avatar jtroo commented on July 2, 2024

I've found that the workaround to this is to toggle NumLock. For some reason when I use NumLock on Windows, it doesn't actually affect the numpad buttons, e.g. kp2. It also doesn't affect the physical arrow buttons when not mapped. However, NumLock state does affect injected arrow keys and specifically only in the Windows start menu.

Very strange. Looking though the code I don't see anything particularly wrong either.

from kanata.

LGUG2Z avatar LGUG2Z commented on July 2, 2024

Aha! At least my immediate problem is solved! I realised that this was also the reason that I couldn't press "up" on Windows typing corrections/completions anymore; this is also fixed by toggling NumLock. πŸš€

from kanata.

thompson-vii avatar thompson-vii commented on July 2, 2024

kmonad/kmonad#574 (comment)

Windows quirk, shift key overrides numlock. Linux doesn't have this issue.

There is currently no way of toggle numlock on key release so any macro that 1) uses kp keys 2) has shift and 3) needs to be held won't work.

from kanata.

jtroo avatar jtroo commented on July 2, 2024

I'm not sure if this one is the same bug because this affects pressing of the physical arrow keys rather than use of the numpad's alternate movement functionality.

It's still likely a Windows-only bug, but it seems to be more specific in the sense that particular Windows UI components handle injected arrow key events weirdly with NumLock.

from kanata.

jtroo avatar jtroo commented on July 2, 2024

I found this while working through the code for the interception driver. It turns out that at some layer, the standard nav keys are actually extended keycodes (uses E0 flag) with the base keycode mapping to the numpad layer. This is not how it looks in Linux or in the Windows hook layers though. Just interesting to note.

Since it's bug in the particular Windows UI components which are doing weird legacy stuff, I'll close this.

from kanata.

ShrykeWindgrace avatar ShrykeWindgrace commented on July 2, 2024

Sorry for necroposting. Another workaround would be to set

(defcfg
  process-unmapped-keys no
)

This, however, might have an impact on the behavior of other things; I have a vague memory of setting that to true because something went wrong with key rolls.

from kanata.

Related Issues (20)

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.