Script to Make the Browser First Responder
New to CO, I wondered for months why sometimes I could get the Browser in Grid mode to behave as documented but mostly not. Specifically, it would sometimes respond to Up and Down keys and Shift but usually not when I was also interacting with the Tool tabs.
It's a focus thing in the input sense. Or "first responder", to give it the Mac programming term. If you click on the Browser before every keyboard interaction, keyboard navigation works as advertised. If you would rather not continually reach for the mouse, this can get a little tedious.
So I created a small script, something of a kludge I admit, to restore proper focus to the Browser from wherever else it might be, maybe a filter text box or keyword text box, etc. Once the script is added to the Capture One Scripts folder, you can specify a keyboard shortcut in System Preferences -> Keyboard -> Shortcuts. I chose Ctrl-B, which is unmapped by default in CO20.
I'd be interested to know if CO21 suffers from this same Browser behaviour. Could we call it a bug? For even the act of switching Tool Tabs from left to right or back (with Cmd-Shift-T) results in the Up and Down arrow keys ceasing to work until you click on the Browser or run this script.
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
tell application "Capture One 20"
set currentDocument to current document
tell currentDocument
set documentName to its name
tell its tool settings
set toolsVisible to visible
set toolsRight to (placement is right)
end tell
set browserToolbarVisible to its browser's toolbar
end tell
end tell
tell application "System Events"
set coProcess to process "Capture One 20"
set frontCOWindow to some window of coProcess whose name is documentName
set toolbarVisible to ((count of toolbars of frontCOWindow) > 0)
-- Focus is applied to one of several controls, based upon the visibility
-- of various UI elements. The focused control should always follow on from
-- the Browser itself in the key view loop.
if toolsRight and toolsVisible then
-- set focus on tool tab radio buttons (tab selector)
set inspectorToolSelector to last item of radio groups of frontCOWindow
set focused of inspectorToolSelector to true
else if toolbarVisible then
-- Set focus on first button on toolbar (is actually a button inside a group)
set theToolbar to first toolbar of frontCOWindow
set focused of first button of first group of theToolbar to true
else if toolsVisible or browserToolbarVisible then
-- in the case of left-hand Tool Tab and no application toolbar or just the Browser toolbar
set inspectorToolSelector to last item of radio groups of frontCOWindow
set focused of inspectorToolSelector to true
else
-- should be nothing else to take the focus? Just return.
return
end if
delay 0.1
-- Tab back to Browser's scroll area, making it first responder
keystroke tab using shift down
end tell
-
This is a bit of an elephant gun to kill a mouse, if ultimately just navigating images is the goal.
Arrow keys on their own are not "Next Variant". They ARE if the browser is focused like you say, but this is a defaulting behaviour.
If you want to navigate variants irrespective of first responder, use the proper shortcut: ⌘+Arrow
0 -
I agree it's ridiculous. The trouble is that, while you're supposed to be able to navigate in the Browser using Up and Down as much as Left and Right keys (or any ⌘-Arrow combination), the moment you bring up the Viewer, the Up and Down arrow keys cease to function. And ⌘-Up and ⌘-Down are not mapped to anything so they don't help. It's quite possible to have the Browser in Grid mode and the Viewer on screen at one time, so one does expect the documented Browser grid behaviour to persist after bringing up the Viewer.
But worse, even when you then dismiss the Viewer, the Up and Down arrow keys still don't work until you click on the Browser (or run my script with a keystroke shortcut). I think it's simply a programming oversight which I personally find very irritating. I've not used any other photo manager that behaved like this.
0 -
Its ⌘ + Right/left. See select menu. Or remap it to what you want in edit> edit shortcuts
0
Post ist für Kommentare geschlossen.
Kommentare
3 Kommentare