Is there a way to create keyboard shortcuts to access groups, in particular the inbox?

is there a way to create keyboard shortcuts to access groups, in particular the inbox ?
thank you for your time and help

Copy an item link and use it in a Keyboard Maestro or Alfred Open URL action

That is an interesting question

We discussed this a while back here:

We were hoping that it would be fixed in a future release

I just tried this macro in Keyboard Maestro and it does not accept the final Return:

@cgrunenberg - Any updated thoughts? Thanks

What do you mean ”to access groups”?
Open them?
Select them?
Search them?
:thinking:

@BLUEFROG: I mean select them

@rkaplan I wrote a macro similar to you and have the same problem, I have to press the enter key manually at the end (I deleted the last Return in the snapshot below). I tried substitute keys like cmd-Enter but nothing works. I have never seen this.

@pete31. Yes item (document) links work fine in KBM. Example below.
I could not find in DT if GROUPS have unique links or UUIDs which I could use the same way.

In general Groups can be opened via Item Link in this way - so yes that works.

But that does not work for an Inbox, which was the original poster’s main question.

@rkaplan @pete31 @BLUEFROG

I have the solution.

For items (documents)

Edit → Copy item link

For groups

!

yes, it works for inbox. I just created a macro in my DT palette

Here’s an AppleScript version

-- Set window root to group 

set theGroupUUID to "7B34C1CC-3652-4C07-9AA7-8C5136B23EDB" -- insert group UUID here

tell application id "DNtp"
	try
		set theGroup to (get record with uuid theGroupUUID)
		
		if exists (viewer window 1) then
			set root of viewer window 1 to theGroup
		else
			open window for record theGroup
			activate
		end if
		
	on error error_message number error_number
		if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
		return
	end try
end tell


2 Likes

very elegant. Bravo ! I replaced my macro with it. Another reason why your script helps is that I have many groups containing “inbox” (for historical reasons related to evernote import), so you AppleScript targets exactly the inbox I want.
thank you very much

1 Like

Do you need the shortcut system-wide or just within DEVONthink? In the second case you could add the groups to the favorites and define shortcuts via System Preferences for the items in Go > Favorites.

1 Like

a good alternative. thank you.

Hello @pete31 . I use your script a lot. Is there any way to modify it to make it work with smart groups ? thank you

Can’t test right now but the script should work with Smart Groups too.

1 Like

it usually works, but not when I try it with smartgroups

could it be that in the script group has to be replaced by smartgroup or something like that ?

thank you for your reply

No. Might be that it’s not possible to open global Smart Groups this way (but can’t test right now).

1 Like

yes, exactly. I did not formulate my question properly. that was the issue. thank you. The solution with be to convert to non global smart group. thank you

I have been pestering you enough this morning. I am just posting this question. Please feel free to ignore it if you are busy or tired.
I like your script very much. It navigates to groups, including smart groups when they are not global (I just tested it).
I want to use your script to create a keyboard maestro menu to navigate the context menu.
I run into the problem of the fact that although the group is indeed highlighted, the mouse cursor does not follow, so that I can’t trigger the context menu with a KBM right click action. Is there any way to both highlight the group and put the cursor on it ?
I mention this because it may be useful for you and other KBM users
thanks !

You could try to use a Keyboard Maestro “Found Image” action (not sure that’s the exact name). This would rely on the sidebar’s selection color and might work or fail depending on the current group name (because the image you would use in Keyboard Maestro of course doesn’t change but the letters in different group names do). Might be possible but won’t work reliable, I think.

What parts of the context menu do you want to replicate in a KM palette? Most of it is accessible via the normal menu too, I think.

mostly Edit… which does not seem accessible via the menu.
Reason is that I create a dummy smartgroup which I am constantly editing to do my searches, instead of the search bar. It is a DevonThink Tip and works well
I have quite a lot experience with KM click at found image action. It is a real pain. Often does not work, and when it does, than stops working for some reason.
thank you