Change shortcut to open Palette

To make it more consistent with command palettes in other websites/applications, maybe you should consider changing the key bind to ⌘+⇧+P?

This is the same as Visual Studio Code and numerous other IDEs and text editors.

1 Like

Yes, please don’t hijack my browser’s shortcut to focus the search bar!

2 Likes

If they would just allow the key binding to be customized, then people could do what they want. I also prefer the idea of Command + Shift + P, to be consistent with all the editors that use this convention.

2 Likes

The entire world uses Cmd/Ctrl-Shift-P, please don’t reinvent this!

1 Like

GH is exploring key remappings so these shortcuts can be fully customized in the future.

2 Likes

As @inkblotty reposted, we did in fact start with command+p and command+shift+p but were unable to consistently override the browser print dialog (which was quite frustrating). We have gotten a lot of feedback on this already and will be discussing as a team how we could improve this experience and/or give users more control / customization.

In the meantime, if overriding the browser search bar command is too frustrating, you can disable the command palette via Feature Preview in your profile dropdown while we work on a solution for you.

2 Likes

Here’s a userland workaround: This userscript remaps Cmd+Shift+P to Cmd+K. Works on Mac only. Maybe someone can create a version of this that also works on Windows/Linux.

// ==UserScript==
// @name         Remap GitHub Command Palette to Cmd+Shift+P
// @namespace    http://dt.in.th/
// @version      0.1
// @description  Remap GitHub Command Palette to Cmd+Shift+P. Only works on Mac.
// @author       dtinth
// @match        https://github.com/*
// @icon         https://www.google.com/s2/favicons?domain=github.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    document.addEventListener('keydown', (e) => {
        if (e.key.toLowerCase() === 'p' && e.shiftKey && e.metaKey) {
            e.stopPropagation()
            e.preventDefault()
            document.body.dispatchEvent(new KeyboardEvent('keydown', { key: 'k', metaKey: true, bubbles: true }));
        }
    }, { capture: true })
})();
1 Like

Hi everyone! We just shipped a new feature that allows you to customize the keyboard shortcuts used to open the command palette. You can now customize the keyboard shortcuts for opening the command palette in search and command modes in the Accessibility section of your user settings.

2 Likes