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

Read-only keymap preview #216

Open
sebmos opened this issue Apr 20, 2024 · 2 comments
Open

Read-only keymap preview #216

sebmos opened this issue Apr 20, 2024 · 2 comments

Comments

@sebmos
Copy link

sebmos commented Apr 20, 2024

One thing I find quite useful about ZSA's Oryx is the ability to point someone to a link that shows my key map.

I was wondering about ways to provide that behaviour with the Keymap Editor. It could be via a page that includes the repo link (but without requiring Github permissions), that shows a stripped-down version without editing features. Alternatively, a preview could be published to the Github repo directly. I could see two ways for how that could work:

  • Creating images of each layer, and just putting them in a README.md file into the repo (possibly in a subfolder to reduce the risk of collisions, but I'd actually prefer it in the root README.md).
  • Creating actual HTML/JS - a subset of the keymap editor without any editing features. That would be the better experience for users, but of course would require setting up Github Pages.
@sebmos sebmos changed the title Publish keymap page to Github Read-only keymap preview Apr 20, 2024
@nickcoutsos
Copy link
Owner

Hey, thanks for sharing this! I've been away so apologies for letting this hang without any response.

I like this idea for sure. I think it relates to the idea of a keymap export type feature in a lot of basic ways but having the "rich" format HTML output would be really valuable. Likewise, being able to share diagrams via URL is a big deal.

Both of these are achievable to some extent, I think, with keymap-drawer. It's possible to incorporate it in a GitHub action so that static diagrams are rendered when the branch is updated and I suspect that you can specify SVG output to get tooltips but don't quote me on that...

Otherwise, yeah, I think I'd need a read-only version of keymap-editor's rendering components. Depending on how much interactivity is expected that may not be too crazy as, technically, I'm already generating HTML in some way, it's just a question of spitting it (and dependent JS/CSS) out. I think it'd be limited to static content, though, as I try to keep backend usage of the system to a minimum.

I'll probably keep this stewing in the back of my head.

@sebmos
Copy link
Author

sebmos commented May 2, 2024

I didn’t know about keymap-drawer until after I posted this. It is a decent substitute and I’ve set it up for my repo.

It makes me wonder if the keymap-editor could integrate more tightly with it, eg providing the ability to set labels, icons etc for keyboard shortcuts and macros that would go into the keymap-drawer config file. 🤔

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

2 participants