-
Notifications
You must be signed in to change notification settings - Fork 77
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
Copy-paste layers #1954
Comments
@likern I've created a tool to copy-paste layers which solves your problems 2 and 3. |
Almost since the beginning I was using karel's firmware. I've a numpad on the right side of the fn layer and sometimes I want to fix this layer (double tap fn), but I don't want to loose the ability to use the arrow keys on the mod layer, so I created a new keymap with the fn and the base layers swapped. Also, copy-pasting layers was very useful when you implemented the new layers, as I had some layers on other keymaps which I could use with macros and I wanted to transfer them to the new layers without assigning one by one all the keys. And lastly, when I made a change on my default IZK keymap, I usually want to spread those changes to other specific keymaps I have. |
I've been thinking about the least obtrusive UI enabling the requested features. The customer layer names and the sync layers feature is not planned, but the rest would be possible. At the end of the layer dropdown menu that contains the layer checkboxes, we'd add a separator followed by a "copy current layer to clipboard" and a "overwrite current layer with copied layer" menu item. What do you think, guys? |
As the copy-paste (copy-overwrite) is a function related to layers and the main goal is to keep the UI as clean as possible, it may work well. I can't think of a better place. |
Brilliant! Thanks for sharing this. Just what I was looking for. Use cases:
|
Why go through a clipboard? When you copy a keymap you also do not use a clipboard, you just click the Duplicate button. I would simply show a dropdown "Copy this layer to:" and then it lists keymaps, and when you hover over a keymap name it drops down all the layers. So you would click a "..." menu and follow a structure like: Or just start with a "Copy layer" button next to the layer selection buttons. |
Thinking about this again, I may be gold-plating this, but here it comes: You want sync. But you only need this if you create an actual copy. What if you could simply reference (link) to an existing layer. Agent would copy that layer only when you "Save" to the keyboard, but not within Agent. So, if you change the original layer, all the references will also update on the next "Save". The UI would show a referenced layer in gray, and a link to jump to the original (in case you want to edit it). You could also decide to break the link, and create an actual copy, then they won't "sync" again as the layer won't be a reference anymore. Thoughts? |
I wouldn't necessarily use the clipboard of the OS, but maybe an internal application-specific pseudo-clipboard. A duplicate function is less general than an overwrite function. One can create a new layer and overwrite it, resulting in duplicating the copied layer. I find the suggested multi-layer menu system hard to navigate, and I'm confident that the suggested copy-overwrite method is easier to navigate. Making layer linking a first-class citizen would complicate the mental model of the layer system, and I don't believe this feature is widely requested enough to justify the added complexity. I'm sure many users would be confused, so I'd only allow layer linking via smart macros. |
I thought about this again, and I think you are right: layer linking should be via smart macros, as this is an "absolutely expert"-mode feature. Copying layers in Agent: I'm trying to understand how a typical use case would work. I've created my awesome super-special layer (or modified it), and now I want to copy it to 3 other keymaps. So I click "Copy layer". Then I navigate to the first of my other keymaps, select the layer I want to copy to, and click "Paste layer". Repeat for the other 2 keymaps. Correct? |
Yes, correct. |
I've been creating a few special layers and I really think naming them in the "Layers" boxes and the drop-downs with something else than Fn2, Fn5 etc. would be nice. But I see the trouble with macro commands such as Users are allowed to name their keymaps though, and you can change keymaps in macros using those names. You could argue that it would be consistent to also allow the naming of layers, at least with short words. I am thinking of layer names such as "mirror", "numtab", "media". |
I think the cost-benefit ratio of renaming layers is very low, considering their prevalence across the firmware, Agent, and documentation. Also, nobody has asked for this feature yet. |
@likern asked for it in the initial post: "Allow to add custom names to layers" I do agree to your statement about cost-benefit. It's a "nice-to-have" wish. |
As a heavy user of layers I have some proposals to make life a little bit smoother.
fn4
layer because I've expected to usefn, fn2, fn3
for some other things. But it turns out they are now empty. Ideally I'd want either move allfn4
settings to justfn
(without breaking macros) or renamefn4
so that it's name becomes meaningful to what this layer does. It can be done only at UI layer (macroses continue to usefn4
internally) or even better to add this support to macroses.fn4
to new (let's sayfn5
orfn3
) layer.fn4
andfn3
, allow to overwritefn3
with whatfn4
has, so I can experiment on a new layer. It's effectively like p. 2 - delete layerfn3
and then duplicate layerfn4
tofn3
.fn3
which has some (any) bindings. Only empty keys gets rebinded fromfn4
.The text was updated successfully, but these errors were encountered: