Exporting single shortcuts?

Recently i've tried to export some single keys, to import it into my other computer. But as it turned out, there were several shortcuts included,
as i could see in the preview pane. Wouldn't it make sense, to be able to export single keys?

Please clarify exactly what you exported.

Well, like is said, some shortcuts (-> customize -> keys -> some key -> file -> export key). Following example shows, what i mean:

The key in the green box was the selectes one, when i chose "export key". But instead, those in the red box, plus plenty other keys were exported as well
(not visible in the screenshot). But with only one key selected, i would expect only that single key to be exoprted, because otherwise it would possibly clash with
the present keys in the target Opus install, generating numerous double entries.

Well I rather take that to mean it doesn't pay attention to hotkey selection at all and just exports everything based on the 'type' drop-down in the save as dialog.

Since we can actually merge keys on import rather than only ~replacing existing keys - it would be great to be able to do what you want. It would be very limited in use though unless GPSoft had appetite for allowing multiple hotkey selection. For now, you're stuck with having to export everything then manually cleaning out the stuff you don't want to share...

FWIW: I've missed this ability in the past and never said anything... stupidly because of the single select thing I just mentioned. But, the same would be great for FileType customizations though I imagine that would be alot trickier than just the hotkey stuff since it could involve system filetypes. In any case, being able to share these other customization elements in a way that could be easily installed/imported into someone else's Opus like we can do with copying and pasting toolbar buttons and importing entire configs would be a real boon in getting new users going ~quickly with a customization request, before they get acclimated to navigating the UI to perform the customizations manually themselves.

So you want to export just one key, but the issue is they are all exported? (Where the original post said several instead of all, I got the impression there was some connection between what was selected and what was exported -- e.g. multiple hotkeys tied to the same command -- which is why I asked for clarification.)

What's the overall aim here, where you want to export one hotkey on its own (or some hotkeys but not others)?

FWIW, we made a change recently (not sure if it's in the current beta or the next) which will make diffing the hotkey config files much easier. Previously, things moved around each time they were saved, making it really difficult to merge or copy specific keys from one config (or exported keys file) to another.

Well, actually it was a bit mor complicated: i made a five piece set of shortcuts to define aliases, & also made five shortcuts to call them. When i exported those then keys, part of them showed a larger scroll bar, indocating that there were
about a dozen items in the exported list, whereas some of them seem to have literally all keys (that's about over 200) exported. I'm not sure, why the outcome differed so much, but bottom line was, that there were more keys than the one i've expected to be exported.

Well, sometimes i make new shortcuts, & tried to import them quickly, instead of going through the editing process for all of them. No big deal, normally, but with the 11er beta, there were a couple of cases, where i wanted to transfer single funtions to my other computer in the music studio.

Sounds good. Thanks Leo, & also to steje for supporting this request. I don't know, if there are more users out there, wanting to export single shortcuts, but i think it would make things quite easier & clearer. When i had my 10 shortcuts imported (those i mentioned above), i first thought, it was some kind of bug, seeing entries like a ten times or so. :slight_smile:

After you export the shortcuts, what are you importing them to? Another machine?

Yes, that's right.

But potentially it also could be useful for the same machine, for example, when having to go back to an older backup, for some reason, but wanting
to add some special new shortcuts.

I think using a diff tool makes most sense here then, since there will probably be more than one change that you want to merge into the other machine's config each time you do it, and that will give you the opportunity to pick multiple changes (without having to manage lots of individual files and import things you can't easily see the effects of as you're importing them).

(Or, if you want the same shortcuts on both machines, just copy the whole file over, of course.)

Hmm, i think i would rather do it the way steje suggested it, by simply editing the .ohk files. I'm not familiar with diff tools, so i might mess things up.

The problem with this is, that many shortcuts refer to paths, which aren't identical on the two machines. So i would have to edit (& find) all the shortcuts with deviating path structures. But anyway, editing the buttons would be alright for me, so far.

One question, would this be a valid key? I removed all keys, which i think didn't belong to the first "module" or part.

<?xml version="1.0" encoding="UTF-8"?>
<hotkeys>
	<key disable="no" hotkey_type="local">
		<label>Set V1</label>
		<hotkeys>
			<chord>
				<key>alt+V</key>
				<key>1</key>
			</chord>
		</hotkeys>
		<function type="normal">
			<instruction>@Confirm Achtung, Alias V1 wird angelegt!|weitermachen|abbrechen</instruction>
			<instruction>Favorites ADD=alias NAME=V1</instruction>
		</function>
	</key>

You probably need the </hotkeys> that was at the end of the original file, to "close" the similar <hotkeys> on the 2nd line.

Ok, got it. Sounds logical. :thumbsup:

I've also recently experimented with a few shortcuts on a different computer, and would prefer being able to batch-select a few shortcuts for export rather then diffing the ugly XML files

What would also help if there were a way to add some kind of "Group" category to shortcuts so you could also group shortcuts by function and in this case could have some "Test" group which would be easy to export/import by sorting by group, selecting the whole bunch and exporting to a file.

1 Like