rougier / svg-lib

Emacs SVG libraries for creatings tags, icons and bars
GNU General Public License v3.0
339 stars 30 forks source link

Add in keyboard shortcut to activate buttons #40

Open chookity-pokk opened 9 months ago

chookity-pokk commented 9 months ago

This is some of the first actual elisp I've ever really written, so it might not be great. Though I did test this on my setup and made some buttons and was able to activate them using the keybinding I put in there. Which by default is unbound to anything. I also think I set it up in a way to make it so the user can edit the keybinding in their config.

rougier commented 8 months ago

Looks pretty good actually. Is there a specific reason for the C-c C-s binding (instead of return or space for example) ? Also, there are some conflicts, you might need to rebase. And most importantly, since svg-lib is on ELPA, you'll need to sign the Copyright Assignment

chookity-pokk commented 8 months ago

I can take care of the rebase after work today. I wasn't sure how to bind it to return while also still having return function normally, if that makes sense. If you know how then I will try implementing it!

I have signed a copyright assignment for the hyperbole project, so would I need to do it again for this project or does it apply to all contributions in general?

chookity-pokk commented 8 months ago

@rougier Just an update here, I did a rebase and sent off for a copyright assignment. I haven't quite found a way to do the keyboard shortcut for enter/return without it overriding the whole buffer though.

rougier commented 7 months ago

We could get inspiration from Emacs widget library and specifically the variable widget-keymap that is applied to widgets.

chookity-pokk commented 7 months ago

I am currently dealing with a lot in my personal life so this likely won't be happening any time soon. If anyone wants to take this over, please feel free to. I will get to it when I have a chance but that likely won't be any time soon.