Coder Social home page Coder Social logo

Function key does not open menu about zxcvbn HOT 3 CLOSED

schollz avatar schollz commented on June 4, 2024
Function key does not open menu

from zxcvbn.

Comments (3)

schollz avatar schollz commented on June 4, 2024

Seems like your keyboard doesn't have full support? What kind of keyboard is it?

from zxcvbn.

niksilver avatar niksilver commented on June 4, 2024

Thanks for the quick reply. My keyboard is a Keychron K8 UK ISO layout. It is new, which means I may be misunderstanding its intricacies somewhat. (However, I can confirm it works fine with my Windows laptop.)

Some further details:

  1. The K8 has an option to swap the way the function keys work. In "function key mode" hitting F1 etc without a modifier will produce the function key, and hitting Fn+F1 etc will produce the corresponding mulitmedia operation. In "multimedia mode" the Fn modifier has the opposite effect with each function key. However, the above error occurs in either mode, and only when hitting the key combination to get F4. When hitting the key combination to get the multimedia operation maiden remains silent.
  2. I have submitted a pull request to the norns core to add a UK keyboard layout. The above error occurs whether I use my new UK keyboard layout or the original norns US keyboard layout. The pull request doesn't change anything about the function keys, by the way.
  3. The above error also happens for function keys F1 to F9.
  4. When the keyboard is in "function key mode" then when I hit F10, F11 and F12 maiden reports mute, volume down and volume up respectively, which are their multimedia operations - even though the function keys should be produced. And the opposite occurs when the mode is switched...
  5. When the keyboard is in "multimedia mode" then when I hit Fn+F10, Fn+F11 and Fn+F12 maiden reports mute, volume down and volume up respectively, which are their multimedia operations - even though the function keys should be produced.

I hope that makes sense.

from zxcvbn.

niksilver avatar niksilver commented on June 4, 2024

Ah, further experimentation reveals this does not happen when the keyboard is switched to MacOS mode (a physical switch on the side - the other option is Windows/Android). In MacOS mode F4 etc does send an F4, although it switches out to a top level norns menu - it isn't picked up by zxcvbn. In Windows/Android mode the function keyboard.code(k, v) can be called with a value of nil for k - and that's what produces the error at this line.

So this is obviously something to do with the way the norns handles this particular keyboard. As a workaround it would be nice if keyboard.code() would handle k being nil (and produce an error in maiden), but clearly the main issue is not with zxcvbn.

Apologies for the somewhat wild goose chase.

from zxcvbn.

Related Issues (6)

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.