Replies: 10 comments 23 replies
-
The reasoning behind the naming is that there is an |
Beta Was this translation helpful? Give feedback.
-
I beg your pardon, I did not express myself well. I meant: "If I understand correctly, on-press-fakekey as I'm using it in my code is setting the state of the fake key
I understand this now. I think I would have got there much quicker if Also, it might have helped to include an example where the fake keys did not ultimately map directly to defsrc keys, and showed both press and release events being handled on a single defsrc key, e.g...
|
Beta Was this translation helpful? Give feedback.
-
I'm a big fan of self-documenting code. I've not understood the widespread
desire for terse function names since the first time someone pointed out
one of mine that could have been more expressive.
I would be very happy to submit a PR for a documentation change.
…On Wed, 28 Feb 2024, 01:31 jtroo, ***@***.***> wrote:
Naming as usual is one of the hard problems of computer science 😉. I
don't think I would have chosen the suggested name though, it's nearly
twice as long haha, and the extra clarity would need to be balanced against
the verbosity when writing the config.
Though I suppose we could use both names that refer to the same function
too.
PRs to improve documentation and examples are very welcome!
—
Reply to this email directly, view it on GitHub
<#790 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADMEDHHO73SNU4SO76LNN3YV2CHVAVCNFSM6AAAAABD32MYPCVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DMMJSGI2TI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I think renaming the whole I'll just start brainstorming: But with this syntax, it is not obvious at first, why naming your events like keys is still a smart thing to do. |
Beta Was this translation helpful? Give feedback.
-
Ah! I see. That makes a lot of sense. Thank you. |
Beta Was this translation helpful? Give feedback.
-
Random thought that popped into my head: I am quite fond of the way the present action reads when taken literally, left-to-right. I don't recall if this was by accident or had some intent behind it. To clarify though, not to the specific word choice - e.g. I'm not attached to "fake" in any way.
Reading
Reading
|
Beta Was this translation helpful? Give feedback.
-
maybe not putting the argument typ in the function name like maybe moving the argument into the function name like |
Beta Was this translation helpful? Give feedback.
-
I'm so glad you made this explicit because I woke up this morning with this...
|
Beta Was this translation helpful? Give feedback.
-
Implemented in #852 (no documentation updates yet). Will leave open for a while for feedback. Taken from the tests, the syntax looks like below. examples of new syntax
Something notable is that
But perhaps this change is not worth the change from before. For example, for those that want to migrate configurations, so I'm questioning if I should keep the changed order or keep the order the same as the original. As an aside here's a vim command to migrate config (basic tests): vim substitute cmd
|
Beta Was this translation helpful? Give feedback.
-
I prefer the new idle-timeout position |
Beta Was this translation helpful? Give feedback.
-
I started using kanata last week and I am loving the power it gives me over my keyboards.
I implemented Shift Lock using deffakekeys, as advised. My implementation works well and I've included that code below. As a result of that, I am curious about a couple of things. My questions are me trying to scratch an itch. They are not things I need answers to in order to use kanata, so this is low priority.
on-press-fakekey
looks like the name of an event handler to me, but I am actually using this function to trigger an event (a key press.) Is there an intentionality in this naming that I am missing?on-press-fakekey
and give it the name of a fake key (which is an alias of another key) but to release that same key I have calledrelease-key
with the non-fake key name. What is the reason for requiring that key presses are done with fake keys while releases can be done with either fake or non-fake keys?Beta Was this translation helpful? Give feedback.
All reactions