-
There are several keyboard shortcuts for everyday tasks on GitHub. Some keyboard shortcuts use single letters like For example, when editing the text suggestions in the Grammarly editor, GitHub will interpret my writing as keyboard shortcuts, often with detrimental results. It would be helpful to disable GitHub keyboard shortcuts so that they wouldn't interfere with other browser plugins/keyboard input. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 8 replies
-
Hey @brylie - sorry for delay in getting you a response, but came across this while searching for feedback. In the fall our accessibility team shipped a feature that allows you to disable character key keyboard shortcuts. You can disable them in the Accessibility section of your user settings. |
Beta Was this translation helpful? Give feedback.
-
Unfortunately only a handful of shortcuts can be disabled in Accessibility. For example for me GitHub has started to think that |
Beta Was this translation helpful? Give feedback.
-
I am on a Mac and use CTL+G with a custom browser extension to switch between github.com and corresponding github.io sites (to grade student work). I never have used keyboard shortcuts on the site. For some reason CTL is now working as a modifier key for an Apple computer and breaking my tool. Please let me disable all keyboard shortcuts. |
Beta Was this translation helpful? Give feedback.
-
I use To hack a workaround, I used tampermonkey and wrote a userscript to disable // ==UserScript==
// @name Github: Disable ctrl+g keyboard shortcut (for macos Group Tab shortcut)
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Disable ctrl+g on github.com
// @author jdanbrown
// @match https://github.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
(() => {
'use strict';
const f = eventName => event => {
// console.log(`[XXX] ${eventName}`, {event}); // XXX Debug
if (event.ctrlKey && event.key === 'g') {
// console.log(`[XXX] ${eventName}: ctrl+g`, {event}); // XXX Debug
// Yep, either of these prevents github from seeing it
event.cancelBubble = true;
event.stopImmediatePropagation();
// Nope, this one prevents github _and_ macos from seeing it
// - ctrl+g configured in: System Settings -> Keyboard -> Shortcuts -> App Shortcuts -> Google Chrome
// event.preventDefault();
}
};
[
'keydown', // This one works
// 'keyup', // This one isn't needed
].map(eventName => {
document.addEventListener(
eventName,
f(eventName),
// Must pass useCapture:true else github still sees it
true, // useCapture
);
});
})(); |
Beta Was this translation helpful? Give feedback.
-
The comment marked as an answer is not an answer. The solution suggested there only disables a subset of the keyboard shortcuts, which are regularly in the way. |
Beta Was this translation helpful? Give feedback.
Hey @brylie - sorry for delay in getting you a response, but came across this while searching for feedback. In the fall our accessibility team shipped a feature that allows you to disable character key keyboard shortcuts. You can disable them in the Accessibility section of your user settings.