keyboard shortcut to access Review > Display Filter?

Is there a keyboard shortcut for quickly searching for a selection in the source or target of my project? That is, I currently have to select sth, and navigate to:

Review > Display Filter

and past it into the Search field (select filter on src or trgt), and click Enter

Michael

PS: and if Nora is reading this, do you have a KnowBrainer script for this (to do it by voice)?

  • CTRL+F6 and several others. Just check the list from the Home page or go to File -> Options -> Keyboard shortcuts and check there or create own.

    _________________________________________________________

    When asking for help here, please be as accurate as possible. Please always remember to give the exact version of product used and all possible error messages received. The better you describe your problem, the better help you will get.

    Want to learn more about Trados Studio? Visit the Community Hub. Have a good idea to make Trados Studio better? Publish it here.

  • If you select something and then Ctrl+F the search dialogue box opens with the selected text in the search field. You just have to make sure source/target option button that you want is selected.
  • Thanks! Yes, I know that one, but was instead looking for a way to quickly use the Display Filter, which displays only those segments that contain your search phrase.
  • Thanks, but this one is dead. As is the Advanced Display Filter keyboard shortcut. See: 

  • Hi Michael,

    Here are a few Dragon scripts I use to filter segments, select segments, change segment status, etc. Sorry, they are not documented. Hopefully you can figure out what is happening. Just import this MyCommands.xml file

    <?xml version="1.0" encoding="utf-16"?>
    
    <!DOCTYPE MyCommands SYSTEM "http://www.nuance.com/NaturallySpeaking/Support/MyCommands/MyCmds11.dtd">
    
    <MyCommands version="2.0" language="0x809">
    
    	<Commands type="global">
    
    		<Command name="get mouse position" group="" enabled="true" states="">
    			<description></description>
    			<contents type="SCRIPT">
    <![CDATA[Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
    End Type
    
    Type POINTAPI
    x As Long
    y As Long
    End Type
    
    Declare Function GetCursorPos Lib "user32" _
    Alias "GetCursorPos" (lpPoint As POINTAPI) As Long
    
    Declare Function GetWindowRect Lib "user32" _
    Alias "GetWindowRect" (ByVal hwnd As Long, _
    lpRect As RECT) As Long
    
    Declare Function GetForegroundWindow& Lib "user32" ()
    Function GetCursorPosition() As POINTAPI
    
    Dim hwind As Long
    Dim pt As POINTAPI
    Dim wRect As RECT
    Dim curPos As POINTAPI
    
    GetCursorPos pt
    
    hwnd = GetForegroundWindow
    
    GetWindowRect hwnd, wRect
    
    curPos.x = pt.x - wRect.Left
    curPos.y = pt.y - wRect.Top
    
    GetCursorPosition = curPos
    
    End Function
    Sub main
    Dim p As POINTAPI
    p = GetCursorPosition()
    
    SaveSetting "MyDNS", "MyCursorPosition", "X", CStr(p.x)
    SaveSetting "MyDNS", "MyCursorPosition", "Y", CStr(p.y)
    
    MsgBox p.x & " " & p.y
    End Sub
    ]]>
    			</contents>
    		</Command>
    
    	</Commands>
    
    	<Commands type="application">
    		<module>SDLTradosStudio</module>
    		<company>SDL</company>
    		<description>SDL Trados Studio</description>
    
    		<Command name="adjust selection [commands_1to10] [commands_1to10]" group="" enabled="true" states="">
    			<description></description>
    			<contents type="SCRIPT">
    <![CDATA[Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
    End Type
    
    Type POINTAPI
    x As Long
    y As Long
    End Type
    
    Declare Function GetCursorPos Lib "user32" _
    Alias "GetCursorPos" (lpPoint As POINTAPI) As Long
    
    Declare Function GetWindowRect Lib "user32" _
    Alias "GetWindowRect" (ByVal hwnd As Long, _
    lpRect As RECT) As Long
    
    Declare Function GetForegroundWindow& Lib "user32" ()
    
    Declare Function keybd_event Lib "user32.dll" (ByVal vKey As _
    Long, bScan As Long, ByVal Flag As Long, ByVal exInfo As Long) As Long
    ' declare virtual key constant for the shift key
    Const VK_SHIFT = 16
    
    Function GetCurrentPosition() As POINTAPI
    
    Dim hwind As Long
    Dim pt As POINTAPI
    Dim wRect As RECT
    Dim curPos As POINTAPI
    
    GetCursorPos pt
    
    hwnd = GetForegroundWindow
    
    GetWindowRect hwnd, wRect
    
    curPos.x = pt.x - wRect.Left
    curPos.y = pt.y - wRect.Top
    
    GetCurrentPosition = curPos
    
    End Function
    Sub Main
    
    Dim p As POINTAPI
    
    top = Val(ListVar1)
    bot = Val(ListVar2)
    
    SendKeys "^%+F", True
    SendKeys "^%+E", True
    
    p = GetCurrentPosition()
    
    SendKeys "^{End}",True
    Wait 0.1
    SendKeys "{Left}{Up " & bot & "}", True
    Wait 0.1
    SendKeys "^+{Home}",True
    Wait 0.1
    SendKeys "+{Down " & top & "}",True
    Wait 0.4
    
    x = Val(GetSetting("MyDNS", "MyCursorPosition", "X"))
    y = Val(GetSetting("MyDNS", "MyCursorPosition", "Y")) + (top - 1)*14
    
    SetMousePosition 1, x, y
    Wait 0.1
    keybd_event(VK_SHIFT,0,0,0)
    Wait 0.05
    ButtonClick 1
    Wait 0.1
    keybd_event(VK_SHIFT,0,2,0)
    
    Wait 0.1
    SetMousePosition 1, p.x, p.y
    
    End Sub
    ]]>
    			</contents>
    		</Command>
    
    		<Command name="change to [segstatus]" group="" enabled="true" states="">
    			<description></description>
    			<contents type="SCRIPT">
    <![CDATA[Sub Main
    
    	SendKeys "%HU"
    
    	Select Case ListVar1
    
    	Case "display list", "display", "list"
    
    	Case "not translated"
    		SendKeys "N"
    
    	Case "draft"
    		SendKeys "D"
    
    	Case "translated"
    		SendKeys "T"
    
    	Case "translation rejected", "rejected"
    		SendKeys "R"
    
    	Case "approved toggle lock"
    		SendKeys "A",True   ' change segments to "translation approved
    		SendKeys "^L",True  ' lock segments
    		SendKeys "^%{F6}",True 'reset filter
    		Wait 1.0
    		SendKeys "{Esc}",True
    		Wait 0.5
    		SendKeys "^{Home}",True
    		Wait 0.1
    		SendKeys "{Down}^{Down}",True
    
    	Case "translation approved", "approved"
    		SendKeys "A"
    
    	Case "sign-off rejected"
    		SendKeys "S"
    
    	Case "signed off"
    		SendKeys "I"
    
    	End Select
    
    End Sub
    ]]>
    			</contents>
    		</Command>
    
    		<Command name="filter [filtertype]" group="" enabled="true" states="">
    			<description></description>
    			<contents type="SCRIPT">
    <![CDATA[Function FilterMenuCommand() As Boolean
    
    FilterMenuCommand = True
    
    Select Case ListVar1
    
    Case "case sensitive", "case" ' toggle case sensitive
    SendKeys "%RS1"
    
    Case "refresh"
    SendKeys "%RH"
    
    Case "reset"
    SendKeys "^%{F6}",True ' reset filters
    SendKeys "%RGI",True
    SendKeys "{Esc 3}"
    
    Case "in source", "source"
    SendKeys "%RGI",True
    SendKeys "{Esc}",True
    SendKeys "^{F6}",True
    Wait 0.1
    SendKeys "{Enter}"
    
    Case "in target", "target"
    SendKeys "%RON",True
    SendKeys "{Esc}",True
    SendKeys "^{F6}",True
    Wait 0.1
    SendKeys "{Enter}"
    
    Case "selection", "source selection", "target selection"
    Clipboard "" ' clear the clipboard in case nothing is actually selected
    Wait 0.2
    SendKeys "^c",True
    Wait 0.3
    Select Case ListVar1
    Case "source selection"
    SendKeys "%RGI",True
    SendKeys "{Esc}"
    Case "target selection"
    SendKeys "%RON",True
    SendKeys "{Esc}"
    End Select
    SendKeys "^{F6}",True
    Wait 0.1
    Clip = Trim(Clipboard())
    SendKeys Clip,True
    SendKeys "{Del}",True
    Wait 0.1
    SendKeys "{Enter}"
    
    Case "no selection"
    SendKeys "^{F6}",True
    Wait 0.3
    SendKeys "{Del}",True
    Wait 0.1
    SendKeys "{Enter}"
    
    Case Else
    FilterMenuCommand = False
    
    End Select
    
    End Function
    
    
    Sub ChooseFromDropdownList()
    
    Select Case ListVar1
    
    Case "show list", "list": n = 0
    
    Case "all segments", "all" : n = 1
    Case "all content" : n = 2
    
    Case "new translated content", "new" : n = 3
    Case "100% matches", "100%" : n = 4
    Case "context matches and perfect match", "context" : n = 5
    Case "fuzzy matches", "fuzzy" : n = 6
    Case "automatically translated", "automatic" : n = 7
    Case "unconfirmed" : n = 8
    Case "not translated" : n = 9
    Case "draft" : n = 10
    
    Case "all repetitions" : n = 11
    Case "first occurrences" : n = 12
    Case "excluding first occurrences" : n = 13
    
    Case "translated" : n = 14
    Case "translation approved", "approved" : n = 15
    Case "translation rejected", "rejected" : n = 16
    Case "signed off" : n = 17
    Case "sign off rejected" : n = 18
    
    Case "with messages" : n = 19
    Case "with comments" : n = 20
    Case "with tracked changes" : n = 21
    
    Case "locked" : n = 22
    Case "unlocked" : n = 23
    
    Case "number only", "numbers" : n = 24
    Case "excluding number only" : n = 25
    
    End Select
    
    SendKeys "^+{F6}",True
    Wait 0.1
    
    If n = 0 Then Exit Sub
    
    SendKeys "{Down " & n & "}",True
    Wait 0.1
    SendKeys "{Enter}"
    
    End Sub
    
    Sub Main
    
    If Not FilterMenuCommand Then ChooseFromDropdownList
    
    End Sub
    ]]>
    			</contents>
    		</Command>
    
    		<Command name="refresh [filter-filters]" group="" enabled="true" states="">
    			<description></description>
    			<contents type="SCRIPT">
    <![CDATA[Sub Main
    	SendKeys "%RH"
    End Sub
    ]]>
    			</contents>
    		</Command>
    
    		<Command name="reset [filter-filters]" group="" enabled="true" states="">
    			<description></description>
    			<contents type="SCRIPT">
    <![CDATA[Sub Main
    	SendKeys "^%{F6}",True ' reset filters
    	SendKeys "%{F6}",True ' filter in source
    	SendKeys "%RGI",True ' need to do this because the change does not show up on the ribbon
    	SendKeys "{Esc 3}"
    End Sub
    ]]>
    			</contents>
    		</Command>
    
    		<Command name="select [segmenttype]" group="" enabled="true" states="">
    			<description></description>
    			<contents type="SCRIPT">
    <![CDATA[Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
    End Type
    
    Type POINTAPI
    x As Long
    y As Long
    End Type
    
    Declare Function GetCursorPos Lib "user32" _
    Alias "GetCursorPos" (lpPoint As POINTAPI) As Long
    
    Declare Function GetWindowRect Lib "user32" _
    Alias "GetWindowRect" (ByVal hwnd As Long, _
    lpRect As RECT) As Long
    
    Declare Function GetForegroundWindow& Lib "user32" ()
    
    Declare Function keybd_event Lib "user32.dll" (ByVal vKey As _
    Long, bScan As Long, ByVal Flag As Long, ByVal exInfo As Long) As Long
    ' declare virtual key constant for the shift key
    Const VK_SHIFT = 16
    
    Function GetCurrentPosition() As POINTAPI
    
    Dim hwind As Long
    Dim pt As POINTAPI
    Dim wRect As RECT
    Dim curPos As POINTAPI
    
    GetCursorPos pt
    
    hwnd = GetForegroundWindow
    
    GetWindowRect hwnd, wRect
    
    curPos.x = pt.x - wRect.Left
    curPos.y = pt.y - wRect.Top
    
    GetCurrentPosition = curPos
    
    End Function
    Sub Main
    
    Dim p As POINTAPI
    
    p = GetCurrentPosition()
    
    Select Case ListVar1
    
    Case "show list": n = 0
    
    Case "all segments", "all" : n = 1
    Case "all content": n = 2
    
    Case "new translated content", "new" : n = 3
    Case "100% matches", "100%" : n = 4
    Case "context matches and perfect match", "context" : n = 5
    Case "fuzzy matches", "fuzzy" : n = 6
    Case "automatically translated", "automatic" : n = 7
    Case "unconfirmed" : n = 8
    Case "not translated" : n = 9
    Case "draft" : n = 10
    
    Case "all repetitions" : n = 11
    Case "first occurrences" : n = 12
    Case "excluding first occurrences" : n = 13
    
    Case "translated" : n = 14
    Case "translation approved", "approved" : n = 15
    Case "translation rejected", "rejected" : n = 16
    Case "signed off" : n = 17
    Case "sign off rejected" : n = 18
    
    Case "with messages" : n = 19
    Case "with comments" : n = 20
    Case "with tracked changes" : n = 21
    
    Case "locked" : n = 22
    Case "unlocked" : n = 23
    
    Case "number only", "numbers" : n = 24
    Case "excluding number only" : n = 25
    
    End Select
    
    SendKeys "^+{F6}",True
    
    If n = 0 Then Exit Sub ' show the dropdown list
    
    Wait 0.2
    SendKeys "{Down " & n & "}",True
    Wait 0.1
    SendKeys "{Enter}",True
    
    SendKeys "^{End}"
    Wait 0.1
    SendKeys "{Left}{Up}"
    Wait 0.5
    SendKeys "^+{Home}"
    Wait 0.1
    SendKeys "+{Down}"
    Wait 0.4
    
    x = Val(GetSetting("MyDNS", "MyCursorPosition", "X"))
    y = Val(GetSetting("MyDNS", "MyCursorPosition", "Y"))
    
    SetMousePosition 1, x, y
    Wait 0.1
    keybd_event(VK_SHIFT,0,0,0)
    Wait 0.05
    ButtonClick 1
    Wait 0.1
    keybd_event(VK_SHIFT,0,2,0)
    
    Wait 0.1
    SetMousePosition 1, p.x, p.y
    
    End Sub
    ]]>
    			</contents>
    		</Command>
    
    		<Command name="toggle lock" group="" enabled="true" states="">
    			<description></description>
    			<contents type="SCRIPT">
    <![CDATA[Sub Main
    	SendKeys "^L"
    End Sub
    ]]>
    			</contents>
    		</Command>
    
    	</Commands>
    
    	<Lists>
    
    		<List name="commands_1to10">
    			<Value><![CDATA[1]]></Value>
    			<Value><![CDATA[10]]></Value>
    			<Value><![CDATA[2]]></Value>
    			<Value><![CDATA[3]]></Value>
    			<Value><![CDATA[4]]></Value>
    			<Value><![CDATA[5]]></Value>
    			<Value><![CDATA[6]]></Value>
    			<Value><![CDATA[7]]></Value>
    			<Value><![CDATA[8]]></Value>
    			<Value><![CDATA[9]]></Value>
    		</List>
    
    		<List name="segmenttype">
    			<Value><![CDATA[show list]]></Value>
    			<Value><![CDATA[100%]]></Value>
    			<Value><![CDATA[100% matches]]></Value>
    			<Value><![CDATA[all]]></Value>
    			<Value><![CDATA[all content]]></Value>
    			<Value><![CDATA[all repetitions]]></Value>
    			<Value><![CDATA[all segments]]></Value>
    			<Value><![CDATA[approved]]></Value>
    			<Value><![CDATA[automatic]]></Value>
    			<Value><![CDATA[automatically translated]]></Value>
    			<Value><![CDATA[context]]></Value>
    			<Value><![CDATA[context matches and perfect match]]></Value>
    			<Value><![CDATA[draft]]></Value>
    			<Value><![CDATA[excluding first occurrences]]></Value>
    			<Value><![CDATA[excluding number only]]></Value>
    			<Value><![CDATA[first occurrences]]></Value>
    			<Value><![CDATA[fuzzy]]></Value>
    			<Value><![CDATA[fuzzy matches]]></Value>
    			<Value><![CDATA[locked]]></Value>
    			<Value><![CDATA[new]]></Value>
    			<Value><![CDATA[new translated content]]></Value>
    			<Value><![CDATA[not translated]]></Value>
    			<Value><![CDATA[number only]]></Value>
    			<Value><![CDATA[numbers]]></Value>
    			<Value><![CDATA[rejected]]></Value>
    			<Value><![CDATA[sign off rejected]]></Value>
    			<Value><![CDATA[signed off]]></Value>
    			<Value><![CDATA[translated]]></Value>
    			<Value><![CDATA[translation approved]]></Value>
    			<Value><![CDATA[translation rejected]]></Value>
    			<Value><![CDATA[unconfirmed]]></Value>
    			<Value><![CDATA[unlocked]]></Value>
    			<Value><![CDATA[with comments]]></Value>
    			<Value><![CDATA[with messages]]></Value>
    			<Value><![CDATA[with tracked changes]]></Value>
    		</List>
    
    		<List name="filtertype">
    			<Value><![CDATA[100%]]></Value>
    			<Value><![CDATA[100% matches]]></Value>
    			<Value><![CDATA[all]]></Value>
    			<Value><![CDATA[all content]]></Value>
    			<Value><![CDATA[all repetitions]]></Value>
    			<Value><![CDATA[all segments]]></Value>
    			<Value><![CDATA[approved]]></Value>
    			<Value><![CDATA[automatic]]></Value>
    			<Value><![CDATA[automatically translated]]></Value>
    			<Value><![CDATA[case]]></Value>
    			<Value><![CDATA[case sensitive]]></Value>
    			<Value><![CDATA[context]]></Value>
    			<Value><![CDATA[context matches and perfect match]]></Value>
    			<Value><![CDATA[draft]]></Value>
    			<Value><![CDATA[excluding first occurrences]]></Value>
    			<Value><![CDATA[excluding number only]]></Value>
    			<Value><![CDATA[first occurrences]]></Value>
    			<Value><![CDATA[fuzzy]]></Value>
    			<Value><![CDATA[fuzzy matches]]></Value>
    			<Value><![CDATA[list]]></Value>
    			<Value><![CDATA[locked]]></Value>
    			<Value><![CDATA[new translated content]]></Value>
    			<Value><![CDATA[no selection]]></Value>
    			<Value><![CDATA[not translated]]></Value>
    			<Value><![CDATA[number only]]></Value>
    			<Value><![CDATA[numbers]]></Value>
    			<Value><![CDATA[refresh]]></Value>
    			<Value><![CDATA[rejected]]></Value>
    			<Value><![CDATA[reset]]></Value>
    			<Value><![CDATA[selection]]></Value>
    			<Value><![CDATA[show list]]></Value>
    			<Value><![CDATA[sign off rejected]]></Value>
    			<Value><![CDATA[signed off]]></Value>
    			<Value><![CDATA[source]]></Value>
    			<Value><![CDATA[source selection]]></Value>
    			<Value><![CDATA[in target]]></Value>
    			<Value><![CDATA[in source]]></Value>
    			<Value><![CDATA[target]]></Value>
    			<Value><![CDATA[target selection]]></Value>
    			<Value><![CDATA[translated]]></Value>
    			<Value><![CDATA[translation approved]]></Value>
    			<Value><![CDATA[translation rejected]]></Value>
    			<Value><![CDATA[unconfirmed]]></Value>
    			<Value><![CDATA[unlocked]]></Value>
    			<Value><![CDATA[with comments]]></Value>
    			<Value><![CDATA[with messages]]></Value>
    			<Value><![CDATA[with tracked changes]]></Value>
    		</List>
    
    		<List name="filter-filters">
    			<Value><![CDATA[filter]]></Value>
    			<Value><![CDATA[filters]]></Value>
    		</List>
    
    		<List name="segstatus">
    			<Value><![CDATA[approved]]></Value>
    			<Value><![CDATA[approved toggle lock]]></Value>
    			<Value><![CDATA[display]]></Value>
    			<Value><![CDATA[display list]]></Value>
    			<Value><![CDATA[draft]]></Value>
    			<Value><![CDATA[list]]></Value>
    			<Value><![CDATA[not translated]]></Value>
    			<Value><![CDATA[rejected]]></Value>
    			<Value><![CDATA[sign-off rejected]]></Value>
    			<Value><![CDATA[signed off]]></Value>
    			<Value><![CDATA[translated]]></Value>
    			<Value><![CDATA[translation approved]]></Value>
    			<Value><![CDATA[translation rejected]]></Value>
    		</List>
    
    	</Lists>
    
    </MyCommands>
    
    into your Dragon command browser. 

    Some of the options might not work, as there have been changes to Studio recently, and these can break the commands. Often it is just a matter of changing the time on a "Wait" command, which you might have to do anyway if your computer is slower than mine.

    "filter <filtertype>" does a few things, e.g. "filter case/case sensitive", "filter refresh", "filter reset", "filter source/in source" (change ribbon to filter on text in the source segment), "filter target/in target", "filter selection/source selection/target selection" (this is probably what you want), "filter no selection". These all basically work with the filter ribbon. I don't use some of them, like "filter case", because Studio subsequently decides to slow to a crawl. The "refresh filter/filters" and "reset filter/filters" are just alternatives to the "filter refresh" and "filter reset" commands.

    "filter <filtertype> also filters on the different segment status values in the dropdown filter list.

    The command "select <filtertype>" is similar to "filter <filtertype>", but after filtering the segments based on their status, it selects them.

    I use "adjust selection <commands_1to10> <commands_1to10>" when I am editing more than one file. The file header and footer tags at the beginning and end of each file can cause problems with locking/unlocking segments. If you want to lock or unlock the segments, the file header and footer tags at the very top and bottom of the editor window cannot be selected.

    I therefore watch what happens when I use the "select <filtertype>" command. If I see that there are, say, three file header/footer tags at the bottom of the editor window and one file header tag at the top, then I use "adjust selection one three" to select the segments without selecting the file header/footer tags at the top and bottom.

    Then I can use the "toggle lock" command to toggle the segments from lock to unlock or vice versa.

    The two commands "select <filtertype>" and "adjust selection <commands_1to10> <commands_1to10>" use a mouse click command to select the segments. The position for the mouse click is set using another command: "get mouse position". I generally have the Studio window maximized on a specific monitor. If the Studio window is moved to another monitor of a different size or the window size is changed, the proper mouse position might have to be reset using this command. To set the proper mouse position, make sure the Studio window is the active window, move the mouse to the segment number column (i.e. the column you would normally click in when selecting segments) just below the top of the first segment and use the "get mouse position" command. It will popup a msgbox with the x and y coordinates. They should be positive and not too big. If one is negative, the Studio window might not have been the active window when you used the command.

    The "change to <segstatus>" command changes the status of the segments that have been selected. I addition to the usual segment status values, I have also included an option "change to approved toggle lock" that I use quite frequently to change the segments to a status of "Translation approved", lock them (actually toggle the lock), reset the filter, go to the top of the editor window and then move to the next segment that needs to be translated. I originally wanted to make this option "change to approved and toggle lock", but Dragon doesn't like the "and" in the middle.

    The "change to approved toggle lock" command comes in handy when I translate batches of segments. After translating a batch of 300 to 400 words I read them over again, confirm them, run a spellcheck and verify on the batch, then change them to approved and lock them so that they will not be included in the next spellcheck/verify.

    Hope this gives you some ideas :-)

    Best regards,
    Bruce Campbell
    ASAP Language Services

  • Hi Michael,

    I think Bruce's Dragon scripts will give you many more ideas than my simple script, which is simply this:

    Sub Main
    SendKeys "^{F6}"
    End Sub

    Maybe a better idea would be to create a voice command for the AHK script described here: community.sdl.com/.../12953