zmk-studio icon indicating copy to clipboard operation
zmk-studio copied to clipboard

Grid Picker for HID Usage

Open awkannan opened this issue 1 week ago • 5 comments

This changes the HidUsagePicker to a grid-of-buttons style of input, similar to what we see in VIA or VIAL. We keep the modifier toggles so people can still add modifiers to their keys too.

Some decisions I made:

  • I'm changing "src/hid-usage-name-overrides.json" to "src/hid-usage-metadata.json". We have to categorize keys manually - so instead of making a 2nd json for categorization which basically had the same shape, I decided to just make the name overrides json a bit more generic. The idea is if we need to add anything else, i.e. icons - it can go in this file, which isn't just limited to name overrides
  • On top of that - if something is going to be categorized in a way that shows it on the grid, we should consider how we want it to be shown on the grid. We should probably define a short name or medium name for these.
  • We have 5 categories - Basic, Numpad, Apps/Media, ISO/JIS, and Other
  • I used the categorization in the ZMK Docs

Some things I need help with:

  • I used Gemini to help me with the CSS. I'm not great at tailwind, so I would love someone with more experience there to review the CSS. It all seems sensible to me, though.

awkannan avatar Nov 25 '25 23:11 awkannan

Deploy Preview for zmk-studio ready!

Name Link
Latest commit af6c818919617bd2ad6073512a9fccd6af042f9e
Latest deploy log https://app.netlify.com/projects/zmk-studio/deploys/692db88454cc610008d85c30
Deploy Preview https://deploy-preview-159.preview.zmk.studio
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Nov 25 '25 23:11 netlify[bot]

https://github.com/user-attachments/assets/25fee646-4727-4e90-b56f-cb6cd183570f

awkannan avatar Nov 26 '25 03:11 awkannan

Are you putting ISO keys like non-us-pound and non-us-backslash on basic?

peterjc avatar Nov 26 '25 16:11 peterjc

NUHS and NUBS are both under the ISO/JIS section at the moment

awkannan avatar Nov 26 '25 16:11 awkannan

Ah - a little cryptic so I missed them, but that's good. Thanks!

peterjc avatar Nov 26 '25 16:11 peterjc

Would "International" be a better name for "ISO/JIS"?

joelspadin avatar Nov 27 '25 00:11 joelspadin

Show "Key Press" in a virtual keyboard may be better, like https://hodgef.com/simple-keyboard/demos/?d=fullKeyboard. That's what I did in my fork, and it works very well.

adminhxx avatar Nov 27 '25 08:11 adminhxx

Show "Key Press" in a virtual keyboard may be better, like https://hodgef.com/simple-keyboard/demos/?d=fullKeyboard. That's what I did in my fork, and it works very well.

I think this could be a good improvement - but I don't want to add too much into this PR.

Right now, it's pretty easy to digest, but with the special-casing dropdown for the "Other" category, it's already a bit messier than I had hoped.

IMO - we should consider this in a subsequent PR. I think this one already moves the experience forward incrementally, and that would be a good incremental change on top of this.

awkannan avatar Dec 01 '25 16:12 awkannan