Keyboard Shortcuts for Layouts

Michael Hite
Michael Hite Member Posts: 373 ✭✭
edited November 2024 in English Forum

Is there a way to assign a keyboard shortcut to different layouts?

2015 13" MacBook Pro - 2 Ghz Intel i7 - 16 GB RAM - 500GB SSD - 2018 iMac Pro - 3.2GHz 8-core Xeon - both systems running OS 10.14.3 (Mojave)

 

Tagged:

Comments

  • Fred Chapman
    Fred Chapman Member Posts: 5,899 ✭✭✭

    I know of not way to assign a keyboard shortcut for layouts within Logos. You can drag layouts to the shortcuts bar for easy one-click access.

    There may be a way to create a script on the Mac that will do what you are trying to do. I am not familiar enough with the Mac Script Editor to say one way or another

  • Gregory Lawhorn
    Gregory Lawhorn Member Posts: 982 ✭✭✭

    Is there a way to assign a keyboard shortcut to different layouts?

    I use a program called Keyboard Maestro (https://www.keyboardmaestro.com), which can do this for you. I use it to change the Program Scaling setting in Logos when I connect to a large monitor. I created a "button" for my "Prep" Layout on the Logos shortcuts bar, then told Keyboard Maestro to click in that exact spot whenever I press CTL-OPT-CMD-P. Keyboard Maestro is useful in a lot of different ways to join together groups of actions. 

  • MWW
    MWW Member Posts: 427 ✭✭

    Thanks Pastor Greg!

    At your suggestion I am testing Keyboard Maestro right now.

    Question is how do you open a layout? There are no hyperlinks that I can find to access layouts. Do you record your actions and make macros out of them? Also, is there a quick way you have found to learn the Keyboard Maestro utility?

  • Pieter J.
    Pieter J. Member Posts: 533

    Try this AutoHotkey script. It can switch layouts on a specified key but also send a Headword or Reference to a layout. You'll maybe need to change it to work on Mac.

    ;Switch Layout in Logos Bible Software
    #SingleInstance Force
    #NoEnv
    #Persistent

    ;Create your custom layout
    ;Select the Resource you want to be the destination of a Headword or Reference
    ;Save the Layout
    ;Assign the name of your custom layout to the hotkey below and/or create new HotKeys for each Layout

    ;Ctrl+A
    ^a::
    ;the layout passed should be a custom layout's name
    layoutName := "00 » Prayer"
    NavigateLayout(layoutName)
    return

    NavigateLayout(layout)
    {
    Logos := ComObjActive("LogosBibleSoftware.Application") ;Attach the Script to the running LBSoftware Instance
    try
    {
    ActivePanel := Logos.GetActivePanel ;Get the Active Panel
    Ref := ActivePanel.GetCurrentReferencesAndHeadwords.Item[0] ;Get the first Headword Entry
    NavigationRequest := Logos.CreateNavigationRequest ;Create a Navigation Request
    NavigationRequest.Reference := Ref.Reference ;Set the Navigation Request to the reference of the ActivePanel
    }
    catch e
    {
    NavigationRequest = ;set to null on error
    }

    Logos.LoadLayout(layout) ;Load the layout anyway

    if NavigationRequest
    {
    DestinationPanel := Logos.GetActivePanel ;Get the ActivePanel in the Destination Layout
    DestinationPanel.Navigate(NavigationRequest) ;Request the Panel to Navigate to the Reference
    }
    }
  • Gregory Lawhorn
    Gregory Lawhorn Member Posts: 982 ✭✭✭

    MWW said:

    Thanks Pastor Greg!

    At your suggestion I am testing Keyboard Maestro right now.

    Question is how do you open a layout? There are no hyperlinks that I can find to access layouts. Do you record your actions and make macros out of them? Also, is there a quick way you have found to learn the Keyboard Maestro utility?

    Sorry for the delay, MWW – we had snow coming to northeast Nebraska yesterday, so we were busy hauling leaves to the landfill before everything turned white.

    OK, on learning Keyboard Maestro, there's a pretty good forum at https://forum.keyboardmaestro.com, a lot like the Logos forums, actually, with lots of helpful information. I used Quickeys back in the 90s and early 2000s, so I was already familiar with the idea of a macro system. The KM manual is also helpful. 

    I don't actually use shortcuts for layouts; I only have two primary layouts, one for my sermon prep, and the other for my doctoral studies, and I have them in the Logos shortcut bar as clickable links. What I did with Keyboard Maestro was to create a new shortcut called Sermon Prep Layout, with a single action: clicking on the Sermon Prep icon in the shortcut bar. I'll walk you through creating this.

    First, create the new macro by clicking on the + button in the Macros column:

    That gives you this blank Macro:

    Rename it whatever you like. Click on the Greek + next to New Trigger, and choose Hot Key Trigger. Set the keystroke to something you aren't already using. I'll set mine to Control-Option-Command-P, for "prep". 

    Now click on the green + next to New Action; you'll see a new Actions panel open up to the left. In the search bar at the top of the Actions panel type "mouse", then double-click on Move Or Click Mouse. That gives you this:

    The top should be fairly self-explanatory. As it is, it will left click your mouse one time at 0 pixels to the left, and 0 pixels from the top, of the front window. What you want to do is to get the coordinates for your shortcut button in Logos. You'll do that by clicking on the Get button:

    If your volume is up you'll hear five high beeps, and then one low beep. Where your mouse is at the low beep is the place it will grab. When you click on Get, go to Logos, and move the mouse to where you want it to click and leave it there. The Logos window MUST be the front window, or the coordinates will be wrong. Because it gets the coordinates of the Logos window, you can move it around your screen (if you have a large monitor), and it will still click on the right spot. If you change your screen scale, or the program scale in Logos, it will stop working until you re-orient it to the new screen size. 

    Here is the complete macro for my current Logos setup and screen size:

    Let me know if you have any questions. 

  • MWW
    MWW Member Posts: 427 ✭✭

    Thanks PJ! I will have to work with this to see what I come up with. Thanks for the information!

  • MWW
    MWW Member Posts: 427 ✭✭

    Pastor Greg, Thanks to you for the illustrations. I think I will like these. I have used MS Word Visual Basic macros extensively. I also have used Alfred to automate processes. I will have to add Maestro to toolbox in my quest for speed and efficiency. I imagine the Apostle Paul & Luke would have loved to have the tools that we have available to us today. What’s our excuse for not winning the world? [:)]