Code Monkey home page Code Monkey logo

Comments (8)

joshgoebel avatar joshgoebel commented on June 9, 2024

https://github.com/joshgoebel/keyszer/blob/exerted/UPGRADE_FROM_XKEYSNAIL.md

Thoughts?

from keyszer.

RedBearAK avatar RedBearAK commented on June 9, 2024

@joshgoebel

Instructions on "upgrading" seem pretty thorough. You're really changing a lot.

What about renaming the "ignore_key" to "ignore_combo" since that is what it is actually meant to be applied to, a combo.

from keyszer.

joshgoebel avatar joshgoebel commented on June 9, 2024

I'm not opposed, you want to make a PR for that? :)

from keyszer.

RedBearAK avatar RedBearAK commented on June 9, 2024

I see it in transform.py, but it looks like it's imported from elsewhere (an API file?). No, I don't really want to mess with that.

If I'm reading this right, this and pass_through_key are actually dealing with one key at a time in the for loop as the combo is disassembled(?), so I guess it's just a point of view which naming is more confusing from the perspective of someone looking at the code loops or just editing shortcuts in the config file.

        elif command is ignore_key:
            debug("ignore_key", key)
            return True
        elif command is pass_through_key:
            debug("pass_thru_key", key)
            _output.send_key_action(key, action)
            return True

from keyszer.

joshgoebel avatar joshgoebel commented on June 9, 2024

pass_throught_key is gone now...

but it looks like it's imported from elsewhere

This is what global search and replace is for. :) And you have me reviewing PRs to make sure you don't break anything.

from keyszer.

RedBearAK avatar RedBearAK commented on June 9, 2024

Is this when condition something that would only be attached to modmaps with just a few key remaps, or is it possible this would be used on a keymap with hundreds of shortcuts? This could be quite annoying/confusing having one part of the information saying what the shortcuts are applying to at the top, and another part at the bottom with many lines in between.

# after
multipurpose_modmap("Microsoft keyboard combos", {
		Key.LEFT_SHIFT: [Key.KPLEFTPAREN, Key.LEFT_SHIFT],
		Key.RIGHT_SHIFT: [Key.KPRIGHTPAREN, Key.RIGHT_SHIFT]
	}, when = lambda ctx: ctx.device_name.startswith("Microsoft")
)

from keyszer.

joshgoebel avatar joshgoebel commented on June 9, 2024

It's Python... you can specify the arguments in any order IF you use their names, if this really bothered someone they can just put the when = first and then do mappings = to put the mappings after... I think in most cases the description should explain what is happening without a need to read the conditional...

from keyszer.

joshgoebel avatar joshgoebel commented on June 9, 2024

I'm also open to suggestions but I don't like varying # of arguments with no explanation or a blank None argument...

from keyszer.

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.