Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename layer-toggle to layer-hold (or layer-shift) #560

Closed
oblitzitate opened this issue Jun 9, 2022 · 7 comments
Closed

Rename layer-toggle to layer-hold (or layer-shift) #560

oblitzitate opened this issue Jun 9, 2022 · 7 comments

Comments

@oblitzitate
Copy link

oblitzitate commented Jun 9, 2022

Anytime I come back to my kmonad config after not touching it for a long time, I've found myself having to look up the difference between layer-toggle and layer-switch. This seems to indicate a red flag with regards to nomenclature.

So here are my arguments as to why the term 'toggle' is not a great term to use:

  • 'Toggle' does not usually imply a momentary switch.

  • It contradicts QMK's usage of the word.

  • It contradicts games' usage of the word (e.g. FPS games differentiates between toggle and hold for the prone key)

  • It contradicts applications' usage of the word (e.g. A lot of apps have a toggle visibility button that isn't momentary)

My suggestions are to use layer-hold or layer-shift instead. I prefer the former word but I wouldn't mind the latter. If there's a better word, I also welcome that.

@oblitzitate oblitzitate changed the title Rename layer-toggle to layer-shift (or layer-hold) Rename layer-toggle to layer-hold (or layer-shift) Jun 9, 2022
@david-janssen
Copy link
Collaborator

david-janssen commented Jun 10, 2022

You are absolutely correct. layer-toggle is a terrible name that I end up looking up myself whenever I reconfigure kmonad.

However, I am also not a fan of layer-hold, since the term hold already has a very rich meaning in KMonad (with all the different tapping and holding buttons) and layer-shift creates a lot of confusion with the word shift, which is another button.

Maybe we could use transient-layer for momentary switch, and persist-layer for when we make a lasting alteration to the layer-stack?

EDIT: or maybe persistent-layer, since that way we keep the terms grammatically symmetrical.

@oblitzitate
Copy link
Author

'Transcient' is a bit too esoteric and doesn't quite convey holding something down.

Why not just use momentary-layer since we've already been using 'momentary' a lot to define it. It also fits with QMK's vocabulary. Also a momentary switch is already a thing in the real world which involves holding a button down, so the word fits perfectly.

persistent-layer is fine to me. It contrasts well with momentary-layer

@slotThe
Copy link
Member

slotThe commented Jun 10, 2022 via email

@david-janssen
Copy link
Collaborator

Hmmmm.. https://www.thesaurus.com/browse/temporary

How about mortal then? :-D And I guess ephemeral is even more esoteric than transient.

But, on a more serious note: momentary seems alright to me, although that does make it sound like the layer might disappear before I release the key. Maybe then we should just bite the bullet and call it temporary layer, or temporary-overlay.

P.S. Just to be clear, I'm thinking about adding these as alternate names, I intend to keep the old names around until I decide to truly break keymap backward-compat.

@oblitzitate
Copy link
Author

oblitzitate commented Jun 10, 2022

The best name should convey that it only exists under a condition or for a limited time, that it is held down, and the name should be easily understood by the average user.

I don't think mortal is good since that word is more associated with living beings, and life and death.

I prefer momentary over temporary because while they both kind of mean the same thing, momentary already has associations with being held down due to the 'momentary switch' in electronics and QMK's layer descriptions.

I do think hold would've been the best name because it's succinct, and I believe the average user would easily distinguish between tap-hold (action-action) and layer-hold (thing-action). There shouldn't be confusion since hold means the same thing in both terms. The only difference is the word's partner, no? Though I understand why you don't like it as much.

@david-janssen
Copy link
Collaborator

david-janssen commented Jun 11, 2022

I don't think mortal is good

Yeah, that was very much a joke ;)

I prefer momentary over temporary ...

Very good, you make a good argument. I will add an alias for layer-toggle to momentary-layer soon.

I do think hold would've been the best name because it's succinct, and I believe the average user would easily distinguish between tap-hold (action-action) and layer-hold (thing-action). There shouldn't be confusion since hold means the same thing in both terms. The only difference is the word's partner, no? Though I understand why you don't like it as much.

I actually think that the (potential) confusion that arises from this name points at a deeper issue with the different buttons that we are currently supporting. When I first defined them I wasn't entirely clear about what underlying semantics I was trying to cover, so I ended up making a bunch of buttons that do different things.

Looking at it now we seem to have mixed at least 2 different things:

  • The patterns that buttons match against
  • The actions that buttons perform

So tap-next, tap-hold, tap-next-release, multi-tap etc. are all essentially patterns that we are trying to detect, and looking at how the user 'maneuvers' through a particular pattern we decide on doing 1 of multiple actions. Then there are also layer-toggle, run-command (or something like that), layer-add, compose-key etc. These are all different actions that can be performed by KMonad. Ideally we wouldn't have countless different buttons, we'd have a few patterns, a few actions, and a way of defining buttons as a branching pattern, with each branch terminating in some action.

That, however, is a different story for a different time :)

EDIT: added a word I forgot.

@david-janssen
Copy link
Collaborator

Fixed in: edf2686

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants