Giter VIP home page Giter VIP logo

hotkys's Introduction

Hotkys

Web site and RayCast extension that allows you to find shortcuts for your app.

RayCast extension adds additional automation features:

  1. Find shortcuts for the frontmost application
  2. Run shortcuts by selecting from the list
  3. Copy bundle id for the frontmost application

Shortcuts Contribution

Shortcuts are stored as a json files in shortcuts-disco-site/shortcuts-data. GitHub link.

Interfaces for input model can be found by this link.

To add new application create a json file in shortcuts-disco-site/shortcuts-data with following template:

{
  "$schema": "schema/shortcut.schema.json"
}

Schema will help with json structure. It doesn't provide all the validation, but dramatically simplifies the whole process.

Each application is described by name, slug and optional bundleId of the macOS application.

  • App contains keymaps
  • Keymap contain title and list of sections
  • Section contains title and list of shortcuts
  • Shortcut contain title, comment and shortcut declaration inside key property. There should be at least key or comment field. Key contains structured shortcut declaration while comment is just a string value.

Shortcuts key rules:

  • Key consist of modifiers plus base key separated by + sign.
  • Supported modifiers: ctrl, shift, opt, cmd. Modifiers should be specified in that exact order, lowercase {@link modifierTokens}.
  • Final shortcut token should always be a base key. List of all base keys: {@link public/data/key-codes.json}.
  • Examples: ctrl+s, shift+cmd+e.
  • Shortcut macro or sequences of shortcuts are also supported and should be separated by space ( ).
  • Example: cmd+k cmd+s (first press Cmd+K and then Cmd+S)
Basic example of shortcuts for Safari
{
  "$schema": "schema/shortcut.schema.json",
  "bundleId": "com.apple.Safari",
  "name": "Safari",
  "keymaps": [
    {
      "title": "Default",
      "sections": [
        {
          "title": "Bookmarks",
          "shortcuts": [
            {
              "title": "Open Bookmarks Manager",
              "key": "opt+cmd+b"
            }
          ]
        },
        {
          "title": "Current Webpage",
          "shortcuts": [
            {
              "title": "Search the current webpage",
              "key": "cmd+f"
            },
            {
              "title": "Print the current webpage",
              "key": "cmd+p"
            }
          ]
        }
      ]
    }
  ]
}

Additional information

Use prettify script to format json files and fix order of key modifiers.

Go to shortcuts-disco-site folder and run:

npm run prettify

hotkys's People

Contributors

solomkinmv avatar dependabot[bot] avatar romanr avatar baruchiro avatar vrsko avatar

Stargazers

Elisey Gretchko avatar Mike Foden avatar  avatar  avatar

Watchers

 avatar

hotkys's Issues

Improve readability of shortcuts

It's almost unreadable with long sequences:

If we add spacing,

 letter-spacing: 0.4em;

And reduce shadow,

 0 0 1px rgb(var(--tw-prose-kbd-shadows)/10%),0 2px 0 rgb(var(--tw-prose-kbd-shadows)/10%)

If this is acceptable I can create the PR.

Manual hotkeys

Hotkeys that are used with mouse are called manual.
I propose adding them under their own, "manual" tag.
So instead of , e.g.

{
     "title": "Panning",
     "comment": "SPACE + DRAG"
},

we'll have

 {
    "title": "Panning",
    "manual": "SPACE + DRAG",
    "comment": "Go slowly"
},

Display manual shortcuts as block of shortcuts with distinct style.

Before:

Arc-Notion  Hotkys-0504 0708@2x

After:

Arc-Notion  Hotkys-0504 0720@2x

Windows/Linux support

Placeholder ticket for adding other platforms. Currently there are no users, so I'll focus on main features and MacOS only.

Please vote in this ticket for multiplatform support.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.