Help talk:Keyboard shortcuts

Latest comment: 6 months ago by Network-charles in topic We May Need to Export Some Templates to Mediawiki

change the mappings

edit

Could someone add the info on how the change the mappings? Dori | Talk 16:08, 23 Oct 2004 (UTC)

I'm also looking around for more info. I bumped into it before, but it's very hard to search for info on this topic. -- Sy / (talk) 16:44, Mar 5, 2005 (UTC)

found it: User_Styles#Changing_access_keys

  • Yes, its very hard to find info on this, finally figured it out on my own. Btw, newer versions of mediawiki does not have monobook.js. I have MediaWiki 1.4rc1 and this is my solution to disable the pesky keyboard shortcuts (that interfere with firefox shortcuts, eg. alt-d to get to URL box).

inside: /wiki/skins/common/wikibits.js

Look for the lines that match this string: akeytt(). There should be two instances of this, one where the function is defined, and when it is called. comment out the part where akeytt() is called and all keyboard shortcuts should be disabled.

Jctong 01:00, 30 Jun 2005 (UTC)

multiple keys for singlr fuction

edit

Is it possible?

in many languages, keys on the keyboard serve double purpose as english or otherwise.

For example, someone writing in hebrew would have to stop and chane the keyborad language before using shortcuts, as Alt-b would be recognized by the computer as Alt-נ.

This kind of defeats the purpose of a shortcut.

Is it Possible to set the Accesskey to be both "b" and "נ"? (I know I can just cjange it to "נ", but I rather have them both) Daniel Tzvi 14:55, 12 October 2006 (UTC)Reply

I tried to clean up

edit

Poorly written, I rewrote a little. Errectstapler 06:48, 19 June 2011 (UTC)Reply

question marks

edit

A number of the rows in the table of Default Shortcuts have a question mark in the keyboard key column. Since the same shortcut can't be used for all these different rows, this must have a special meaning, but what? Does it mean

  • There's no default shortcut for that function?
  • There is one, but the person building the table didn't know what it was?
  • Something else?

There needs to be a statement of what that question mark means.

Thnidu (talk) 17:58, 27 February 2013 (UTC)Reply

Thailand keyboard

edit

Keyboard Thailand Ann-1902 (talk) 15:07, 8 April 2019 (UTC)Reply

Setting keyboard in Thailand Ann-1902 (talk) 15:08, 8 April 2019 (UTC)Reply

@Ann-1902: This seems to be a request for help with a Thai keyboard layout or setting up a Thai input method.
First, have you set Thai as your preferred language, either in your preferences or through a link to the left of your username in the top-right corner of any wiki page (do this on the wiki you want to edit).
Are any of the following pages helpful to you?
You may have more success getting help at the Thai Wikipedia, assuming you speak and read Thai. - dcljr (talk) 08:25, 9 April 2019 (UTC)Reply

j/k for next/previous section, like Facebook groups, Twitter

edit

There should be a way to bind plain j/k for next/previous section, like Facebook groups, Twitter have. Jidanni (talk) 07:31, 29 May 2019 (UTC)Reply

JS script to change keyboard shortcuts

edit

I installed in MediaWiki:Common.js and it works like a charm. It's ugly, but it should be straightforward and easily expandable to other keys (also for other combinations than Alt+key)

/* replace accesskey 'Alt+t' to insert tabs in visual editor */
/* replace accesskey 'Alt+i' to make italic */
/* replace accesskey 'Alt+b or Alt+g' to make bold */
if(mw.config.get("wgAction") == "edit") { // check if we are in the editor
    $.when($.ready, mw.loader.using("mediawiki.util")).then(function() {
	var i;
	var alreadyHasAccessKey = $('[accesskey="t"], [accesskey="i"], [accesskey="b"], [accesskey="g"]');
        for( i = 0; i < alreadyHasAccessKey.length; i++ ) { // remove existing accesskeys
        	alreadyHasAccessKey[i].setAttribute( "accesskey", "" );
        	$( alreadyHasAccessKey[i] ).updateTooltipAccessKeys();
        }
	document.onkeyup = function(e) {
		if ( !(e.ctrlKey) && e.altKey && !(e.shiftKey) && ( ( e.which == 84 ) || ( e.which == 73 ) || ( e.which == 66 ) || ( e.which == 71 ) ) ) { // get key codes --> https://keycode.info/
			var editTextBox       = document.getElementById( 'wpTextbox1' );
			var selectionStartPos = editTextBox.selectionStart;
			var selectionEndPos   = editTextBox.selectionEnd;
			var textBefore        = editTextBox.value.substring(0,                 selectionStartPos);
			var textSelected      = editTextBox.value.substring(selectionStartPos, selectionEndPos);
			var textAfter         = editTextBox.value.substring(selectionEndPos, editTextBox.value.length);
			var textInstead       = "";
			if ( e.which == 84 ) { // 84 : t
				tagPre = "\t";
				textInstead = textSelected;
				tagPost = "";
			}
			if ( e.which == 73 ) { // 84 : i
				tagPre = "''";
				if (textSelected != "") { textInstead = textSelected; } else { textInstead = "text in italic here" }
				tagPost = "''";
			}
			if ( e.which == 66 ) { // 66 : b
				tagPre = "'''";
				if (textSelected != "") { textInstead = textSelected; } else { textInstead = "text in bold here" }
				tagPost = "'''";
			}
			if ( e.which == 71 ) { // 71 : g
				tagPre = "'''";
				if (textSelected != "") { textInstead = textSelected; } else { textInstead = "text in bold here" }
				tagPost = "'''";
			}
			editTextBox.value = textBefore + tagPre + textInstead + tagPost + textAfter; // replace text
			if ( textSelected === "" ) { // reposition cursor
				editTextBox.selectionStart = selectionStartPos + tagPre.length + textInstead.length ;
				editTextBox.selectionEnd = editTextBox.selectionStart;
			} else {
				editTextBox.selectionStart = selectionStartPos + tagPre.length ;
				editTextBox.selectionEnd = editTextBox.selectionStart + textInstead.length ;
			}
		}
	};
        console.log('Started Alt+key to insert in editor : i-italic, b,g-bold, t-tab');
    });
}

The preceding unsigned comment was added by Shtonchjo (talk • contribs) 21:19, 13 April 2020 (UTC)

Why q for special pages?

edit

Just for my curiosity, why we have a 'q' to visit special pages? (originally asked today in w:it:Wikipedia:Officina by our User:Pierpao) --Valerio Bozzolan (talk) 14:24, 7 January 2021 (UTC)Reply

We May Need to Export Some Templates to Mediawiki

edit

Hi @Pppery, Template:Key press, Template:Key press/core, and Template:Unicode are required to render the keys specified in the "Modifier keys by browser and operating system" table of this page. Network-charles (talk) 10:18, 14 June 2024 (UTC)Reply

Huh? mw:Template:Key press and mw:Template:Key press/core already exist. Template:Unicode here shouldn't exist either as it no longer does anything useful (replace {{unicode|foo}} with just foo). * Pppery * it has begun 16:21, 14 June 2024 (UTC)Reply
Thanks for pointing that out, I initially couldn't find it. On MediaWiki, the table renders correctly now. Network-charles (talk) 16:28, 14 June 2024 (UTC)Reply
Return to "Keyboard shortcuts" page.