-
Notifications
You must be signed in to change notification settings - Fork 4
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
Key binding improvement #1343
Comments
The default keybinding includes a layout based on the zynthian V4, if you have a similar keyboard as the UK author:
The Event column refers to internal API events, not specific zynthian keys. This is a fairly low-level hardware configuration where some understanding of the zynthian's CUIA is desirable. This page of the wiki has some useful information. |
What I gather from this is that the Zynthian v5 got designed to have physical buttons with text on them describing functions which don't match previous hardware designs and also don't match the intended design of the software going forward and also aren't a generic industry standard layout like a numpad. So there are custom keys mapping to custom buttons mapping to custom events: three layers of abstraction (buttons on the device, QWERTY keys, events) without having started from a consensus on what the control scheme is going to be. Is that an accurate assessment of what happened? No wonder I'm having so many problems just trying to control this thing. It is not clear at all which buttons / keys / events will do what in what context. I don't mind a little menu diving in a synth but some consistent easy-to-remember rules about what does what when would be nice. Is an "encoder" a British word for a "knob"? I also don't understand how the buttons on the v4 which I don't have would map to the buttons on the v5 which I do have. |
Is an "encoder" a British word for a "knob"? A "knob" is the plastic thing that is attached to an electronic component. That might be a potentiometer but in the zynthian we use rotary encoders. These are continuous / endless rotation devices that encode motion into electronic signals. We abstract the user interface in many ways. It is presented on a V4 with a small touchscreen, 4 rotary encoders with push switches and 4 buttons. On the V5 the UI is presented with a larger, multitouch screen, 4 rotary encoders with push switches and 20 buttons. For touch-only devices we present a screen with touch actions and gestures. For VNC we present a screen with mouse and keyboard binding, etc. Many enthusiasts build their own variations of this. The default keyboard binding includes the V4 layout I described earlier because it was written on the V4 before the V5 was an itch in its parents' pants. There is also default keyboard binding for a numeric keypad which also makes sense to the designers. Users comprehension may vary! The V3, V4, V5, etc. are designed to be used with their hardware controls, i.e. the default V4 configuration uses UI that differs to the default V5, due to its fewer controls. It didn't make sense to us to provide a keyboard map for the V5 that has many more buttons and hence would require many more keys which, on a standard keyboard do not layout in a 4x5 grid like the V5 does. (There have been users who have built 4x5 USB keypads.) Also, zynthian is built worldwide and there are many different keyboards so creating default keybinding layouts for every user would be fairly futile - most users would want to customise this in some way to better suit themselves, e.g. the default mapping of KeyA to start audio recording may make little sense to a Pole who might expect a different key to be used for "nagranie dźwiękowe". I am pretty pleased with the keybinding in webconf. It is fast and fairly simple and even has a learn function (although that is kinda undermined by the need to use the browser keyboard rather than an attached keyboard). As soon as you hit Save the changes are applied. Constructive suggestions for improvement are always considered, especially when posed with a postive attitude. There is an additional layer of abstraction available in the keyboard binding. I had initially avoided it but realised its benefit. You can bind keys to specific actions, like Toggle Audio Record. You can also bind keys to switch or encoder actions which has the benefit of allowing you to drive the zynthian from the QWERTY (or whatever) keyboard just like from its front panel. The default mapping includes that binding for V4. The same could be done for V5 by mapping keys to ZYNSWITCH 4..23, i.e. the top left button (OPT/Admin) is ZYNSWITCH 4 and the bottom right button (F4) is ZYNSWITCH 23. The rotary encoders and their switches are mapped the same as the V4 encoders. |
Thanks for explaining what an encoder is and how, while it looks like a knob, it's actually a distinct physical control because of the properties you described. It looks like the answer to my question, "Is that an accurate assessment of what happened?" is yes, that is what happened because different enthusiasts were all making their own custom hardware. Is there a way to just paste a large number of custom key/control bindings at once, like by editing a config file? If so, then I am thinking to make one that's specific to the combination of the Zynthian v5 and American QWERTY. I am thinking that the 5x4 grid of buttons on the Zynthian v5 should map to these keys:
on an American QWERTY keyboard. The encoders could be mapped like this:
That way, the keyboard layout would match the physical button layout. It'd be like playing StarCraft with TheGrid key bindings. But I don't want to make this for just my one current install of the Zynthian OS: I want to have a process to add it quickly to any new install so that's why I'm asking about if I can make it so I can quickly paste the entire scheme at once. |
The file that holds this info is
You can save a backup of the config files using webconf's backup feature. You could do a backup, edit the json file then restore the backup with the edited file. |
Great info, thanks! I see the events are in ALLCAPS but the keys are in mixed case and only some keys start with a capital letter. Are these strings being evaluated case sensitive so I have to be careful to match or is it case insensitive so it doesn't matter? If it's case sensitive, what case should I use for the function keys? I get that the I also get that the upper left button on the 5x4 grid is But what are Also, if I happened to edit the config files with nano over SSH, what would I need to do to make my changes take effect? Or is that just a bad way to do it? My plan is to make a Github Gist of my custom keybinds with instructions on how to install them when I'm done with this. ;) |
Just so there's no confusion, I asked four questions:
(later edit: Four questions, not three. Oops!) |
Almost correct. The push switches on the encoders are zynswitch 0..3. |
|
I believe this ticket to be a request for assistance in configuring key bindings which has been provided. I do not believe there to be a bug report or feature request so will close the ticket. Please re-open or create a new ticket if you need further assistance. |
Is your feature request related to a problem? Please describe.
I get on the VNC and try to control the Zynthian with my PC keyboard only of course the default key bindings aren't anywhere even close to being intuitive. But OK, eventually I find out that I can look at what the key bindings are in the web interface at http://zynthian.local/ui-keybind so that makes sense.
But then I see that the text displayed in the "Event" column for what the keys actually bind to does not match the text on the physical buttons on the actual Zynthian v5 device at all. Nor am I aware of there being any sort of chart in the documentation so that I could do a lookup of the lookup to resolve what keys go to what buttons. I was just trying to access the admin menu but I ended up accidentally shutting down the device without ever opening the admin menu because I pressed the wrong keys somehow. What the hell.
Describe the solution you'd like
The "Event" column in the web interface key bindings page should show the same text as is on the physical buttons on the device. This could replace the "Event" column or it could be added to the event column (like it could display both the event and the actual button text) or it could be an additional column on that page describing the events.
Describe alternatives you've considered
Someone could make a graphic / chart showing which physical button triggers which "Event" so to find out how to get the equivalent of that button, you'd first look at the chart to find out which event you want from the button, then look at the key bindings to find out which key triggers that event. That would be an entire extra step for users but it would at least be possible instead of pressing random "ZYNSWITCH " events and just hoping one of them opens the admin menu like I was doing.
Additional context
I'm visually impaired so I struggle to see the small screen on the Zynthian device, which is why having VNC as an option helps. Or would help, if I could figure out how to open the admin menu because so far I still haven't managed to do it.
The text was updated successfully, but these errors were encountered: