KeyboardCowboy icon indicating copy to clipboard operation
KeyboardCowboy copied to clipboard

All Workflows Deleted After Update

Open Jackodawacko opened this issue 1 year ago • 36 comments

Hi there,

Did an update to 3.28.0 (2673) and once the application restarted, all my workflows disappeared. Not sure exactly why but wanted to keep you informed.

Is there a way of retrieving all my old workflows or will I need to start from scratch? Also, I do have a backup of my Mac with Time Machine if that helps anything.

Thanks

Jackodawacko avatar Sep 24 '25 19:09 Jackodawacko

Hey @Jackodawacko,

Out of curiosity, from which version did you update from? Keyboard Cowboy does backups when a new version is installed; they are located inside ~/.config/keyboardcowboy/backups.

Your current configuration should be ~/.config/keyboardcowboy/config.json.

If you downgrade to your previous version and simply copy the old version's configuration into the primary location, you should be able to restore all your previous workflows.

If you don't mind, can you share the name of the configuration file that resides inside the backup directory, the one with the highest number? The number in question represents the build number for the application.

This is what mine looks like: backup folder looks like:

~/.config/keyboardcowboy/backups
$ ls
 config.2171.json   config.2429.json   config.2571.json
 config.2182.json   config.2433.json   config.2575.json
 config.2184.json   config.2441.json   config.2578.json
 config.2187.json   config.2453.json   config.2585.json
 config.2192.json   config.2455.json   config.2587.json
 config.2196.json   config.2467.json   config.2589.json
 config.2199.json   config.2471.json   config.2592.json
 config.2200.json   config.2473.json   config.2603.json
 config.2218.json   config.2479.json   config.2611.json
 config.2232.json   config.2482.json   config.2617.json
 config.2242.json   config.2490.json   config.2619.json
 config.2291.json   config.2495.json   config.2652.json
 config.2302.json   config.2530.json   config.2660.json
 config.2305.json   config.2532.json   config.2661.json
 config.2334.json   config.2547.json   config.2662.json
 config.2417.json   config.2552.json   config.2666.json
 config.2418.json   config.2560.json   config.2673.json
 config.2424.json   config.2563.json   config.2677.json
 config.2427.json   config.2566.json

Hope that helps!

zenangst avatar Sep 24 '25 21:09 zenangst

Same thing happened to me when I updated to version 3.28.0 (2673). The highest number in 'backups' is 2673 (but that's my current version, right?). The highest below that is 2471. Both files have identical contents.

My primary config.json file in the directory above is also identical and still has all my settings in it (if I open the file in a text editor). But when I quit and restart Keyboard Cowboy, it's all still empty in the app. I guess the file isn't modified because I didn't start trying to recreate my shortcuts in the new version.

If I downgrade to Keyboard Cowboy 3.27.3 (2471), all my shortcuts and settings reappear.

ryancu7 avatar Oct 02 '25 11:10 ryancu7

@ryancu7 Would you mind sharing your configuration file? If the leap between the versions is too big, then the proper migrations are probably not in place, but I can probably manually migrate your configuration for you so that you don't end up with any data loss.

zenangst avatar Oct 05 '25 22:10 zenangst

Here it is: config.json

ryancu7 avatar Oct 06 '25 01:10 ryancu7

@ryancu7 I think I figure out what was going wrong with the migrations. Could you try an see if this configuration works for you?

config.json

zenangst avatar Oct 06 '25 05:10 zenangst

Hmm, it doesn't work either. (I quit Keyboard Cowboy, replaced the file at ~/.config/keyboardcowboy/config.json with the new one in your message and launched the new version of Keyboard Cowboy, and it comes up blank just like before.)

ryancu7 avatar Oct 06 '25 10:10 ryancu7

I'm going to make a new version for you that handles this migration for you. Hopefully, I'll be able to create it this evening. Sorry for the wait.

zenangst avatar Oct 06 '25 12:10 zenangst

@Jackodawacko @ryancu7 could you try this version?

Keyboard Cowboy 3.28.1.zip

@ryancu7 I tried using your config and launching the application now, it loaded your configuration without any errors.

zenangst avatar Oct 06 '25 16:10 zenangst

It loads, thank you, but I noticed that the modifier keys for the shortcuts (i.e. option, command) have all changed to the left key version. I had duplicates set up of some shortcuts so that I could use the left and the right option or command modifier keys equally, like how built-in keyboard shortcuts work. Ideally IMO, by default, a Keyboard Cowboy shortcut would work with left or right indiscriminately, and locking it down to only one or the other would be a more advanced usage, whereas currently it's kind of the other way around.

ryancu7 avatar Oct 07 '25 09:10 ryancu7

Hey @ryancu7,

Glad we managed to figure it out! :)

In later versions, this became a feature in Keyboard Cowboy, and I've started using them myself pretty frequently. But I do understand that it is cumbersome to have to duplicate your workflows just to have it work for left and right.

So I have been considering adding an option to make it apply to both with a checkbox on the keyboard shortcut. This, however, won't be the default but an opt-in setting for users that want to use the "non-unique" way of mapping keys.

How does that sound?

zenangst avatar Oct 07 '25 10:10 zenangst

@Jackodawacko did you get around to test the new version of the app that was posted here, I hope it fixes your issues as well.

zenangst avatar Oct 07 '25 10:10 zenangst

A fix was released in version 3.28.1

https://github.com/zenangst/KeyboardCowboy/releases/tag/3.28.1

zenangst avatar Oct 07 '25 16:10 zenangst

I do understand that it is cumbersome to have to duplicate your workflows just to have it work for left and right. So I have been considering adding an option to make it apply to both with a checkbox on the keyboard shortcut. This, however, won't be the default but an opt-in setting for users that want to use the "non-unique" way of mapping keys. How does that sound?

That's fine, I'd be very happy with that. Even for users who never want to enable the option, it will make Keyboard Cowboy better for new users because it would tip them off to the fact that it is actually sensitive to the left and right, which isn't necessarily obvious.

Thanks!

ryancu7 avatar Oct 07 '25 23:10 ryancu7

@zenangst - my apologies for being MIA, I'm back now.

So I didn't have that many shortcuts originally so I just went ahead and recreated all of them. But just wanted to create a ticket and notify about the problem :).

If there's any way I can help out, please let me know!

EDIT: I just updated to the most recent Keyboard Cowboy (3.28.1). It's working correctly but when I try to actually open the main window, it just crashes. I can reopen it and all my shortcuts will work correctly but if I need to use the main window to do any updates/etc, it just crashes.

Can you instruct me how to send you a log? Sorry, I'm somewhat tech savvy but not to the point of grabbing a log lol

Jackodawacko avatar Oct 08 '25 19:10 Jackodawacko

@Jackodawacko no worries, mate. But out of curiosity, which kind of shortcuts did you have/did you recreate? The problem was with script and keyboard shortcuts. If you have a copy of your old configuration, then I could verify that the issue is resolved or not. Otherwise, it is fine because I think we actually nailed it in the last release :)

zenangst avatar Oct 08 '25 19:10 zenangst

@zenangst - I'll be glad able to help out and get you the old shortcuts. Just if you can check out my last message and the "EDIT" section. Once I can get past that, I'll be more than happy to get you a copy of the old configuration

EDIT:

I've made a ZIP of the backup folder. Just trying to figure out how to send it over to you. Is it safe to upload it on this thread or is a PM better

Jackodawacko avatar Oct 08 '25 19:10 Jackodawacko

@Jackodawacko I only need the two with the highest and second highest build number. You can email it to me if you like.

zenangst avatar Oct 08 '25 20:10 zenangst

@zenangst - sent over my backups. I did a bit of digging between the latest two backups 2673 & 2677. Looks like I forgot to add a few shortcuts that were in 2673 to 2677. Still running into the issue with KC crashing, let me know if you need me to do anything

Jackodawacko avatar Oct 08 '25 21:10 Jackodawacko

@Jackodawacko can you post the crash report?

zenangst avatar Oct 08 '25 21:10 zenangst

@zenangst - just sent it over in an email. Let me know if it doesn't come through and I'll upload it here.

Jackodawacko avatar Oct 08 '25 22:10 Jackodawacko