Wikipedia:Reference desk/Archives/Computing/2024 April 6

= April 6 =

Is it possible to change the Wikipedia keyboard shortcuts?
Keyboard shortcuts lists a bunch of keyboard shortcuts, several of which I use all the time. I want to use alt+e (to open the source editor) but this just opens a menu on Google Chrome for me. I had a look and it doesn't seem to be possible to stop the menu from opening, so to me, it looks like I would have to change the Wikipedia keyboard shortcut, but I am not sure how, if it is possible. —Panamitsu (talk) 02:18, 6 April 2024 (UTC)


 * @Panamitsu I didn't find anything like this, but I did find a similar user script that lets you jump to pages using keyboard shortcuts. It's here. Note: I am not liable for the content of user-created scripts. You install this script at your own risk.   thetechie@wikimedia  :  ~/talk/  $  03:18, 6 April 2024 (UTC)


 * There is also the reverse option of changing the shortcut Chrome uses. Though this will change it "globally" inside the browser. A Web search for "can you change shortcuts in chrome" appears to give plenty of useful guidance. Door number 3: You could have a WP:Userscript set all the shortcuts on WP to your liking, and even add more. This shouldn't be super complicated; if you want let me know and I might give it a stab myself. --Slowking Man (talk) 21:49, 8 April 2024 (UTC)
 * @Slowking Man How would I take this approach instead? Superjump seems convoluted on second thought.  thetechie@wikimedia  :  ~/talk/  $  15:13, 10 April 2024 (UTC)
 * If you mean, the third option...actually if all you want is to just change that one accesskey for the editor, the quick-and-dirty way is to pick an unused key, and use some JavaScript to pull the HTML element with the id "ca-edit" and change the "accesskey" attribute in the "Edit" link inside that element. Like I said quick and dirty. You could also look and see if someone has written a Chrome browser extension that lets you add key shortcuts.


 * Yet another option: you could install something like AutoHotKey, which will then let you set custom shortcuts on your system to do all kinds of things. But then you have to write the script for AutoHotKey to use. Yeah unfortunately this is a fiddly little problem to solve because it involves not simply adding a thing, but reconfiguring/overriding already-configured behavior from both your browser and Wikipedia, and, to do a thing like open the editor, you have to tell your browser to follow a certain specific link on the Wikipedia page you're looking at (namely the "Edit" link). The neat thing about computers is you can set them up to do anything they're told to do. The frustrating thing about computers is, you can set them up to do anything... The quickest way in terms of time will be to just change that key shortcut in Chrome to something else; then the "edit" accesskey should work. --Slowking Man (talk) 06:00, 11 April 2024 (UTC)
 * @Slowking Man No, I meant writing the user script for the keyboard shortcut changing.  thetechie@wikimedia  :  ~/talk/  $  14:15, 11 April 2024 (UTC)
 * Starting point: MediaWiki:Gadget-removeAccessKeys.js. Take that and you can hack it up to, instead of deleting the accesskeys, change them to your desired ones. If you wish, you can crib some code from Superfetch to enable storing the key settings in a separate config file rather than hardcoded. (And if you spend effort on it, then publicize your script so others can benefit! And for bragging rights!) --Slowking Man (talk) 22:25, 11 April 2024 (UTC)