Skip to content

Pressing the Focus Mode shortcut brings up the Search Sidebar #2040

Closed

Description

@sabretooth1

Description

When I press the shortcut for entering Focus Mode (Ctrl+Shift+F), Mark Text instead opens the Search sidebar. It does not enter Focus Mode. Pressing the shortcut again while the search sidebar is open has no effect.

  • Can you reproduce the issue?

Steps to reproduce

  1. Open a file, or create a new file
  2. Press Ctrl+Shift+F

Expected behavior:

Mark Text should enter Focus Mode.

Actual behavior:

The Search Sidebar opens.

Link to an example:

2020-04-11 21_24_47-Untitled-1 - Drafts

Versions

  • Mark Text: 0.16.1
  • Operating system: Windows 10 Home 64-bit

Activity

  1. st-den commented on May 12, 2020

    @st-den

    I have the same problem, it really worsens my performance, because these settings are not remembered.

    By the way, the Typewriter Mode shortcut (Alt + Ctrl + T) doesn't work at all, could it be related? The Source Code Mode (Alt + Ctrl + S) works fine, though.

  2. iJunkie22 commented on May 17, 2020

    @iJunkie22

    I have found that remapping Toggle Focus mode to use Alt instead of Shift (and remapping Replace so it doesn't conflict) makes it work. I also found that at least on Mac, the current shortcut (the one using Shift) works, but only if you have the View menu already open. It appears someone has already unsuccessfully attempted to remedy this by wrapping the typewriter mode and focus mode callbacks in this little function

    const focusEditorAndExecute = fn => {
      setTimeout(() => bus.$emit('editor-focus'), 10)
      setTimeout(() => fn(), 150)
    }

    The bindings live here and look like this

    // --------------------------------------------------------------------------
      // View
    
      {
        id: 'view.source-code-mode',
        description: 'View: Toggle Source Code Mode',
        execute: async () => {
          bus.$emit('view:toggle-view-entry', 'sourceCode')
        }
      }, {
        id: 'view.typewriter-mode',
        description: 'View: Toggle Typewriter Mode',
        execute: async () => {
          focusEditorAndExecute(
            () => bus.$emit('view:toggle-view-entry', 'typewriter')
          )
        }
      }, {
        id: 'view.focus-mode',
        description: 'View: Focus Mode',
        execute: async () => {
          focusEditorAndExecute(
            () => bus.$emit('view:toggle-view-entry', 'focus')
          )
        }
      }, {
        id: 'view.toggle-sidebar',
        description: 'View: Toggle Sidebar',
        execute: async () => {
          bus.$emit('view:toggle-view-layout-entry', 'showSideBar')
        }
      }, {
        id: 'view.toggle-tabbar',
        description: 'View: Toggle Tabs',
        execute: async () => {
          bus.$emit('view:toggle-view-layout-entry', 'showTabBar')
        }
      },
  3. added
    🐛 bug
    on Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions