MediaWiki talk:Gadget-KeyShortcuts.js

From Wikidata
Jump to navigation Jump to search

Wikidata_talk:Tools#Keyboard_shortcuts

  • L to move cursor to Label box (so you can press "L" and then immediately start writing)
  • D to move cursor to Description box
  • S to navigate to "Statements" heading
  • A to highlight the "[add]" under Statements (or preferrably to have the same effect as clicking "[add]")
  • I to navigate to "List of pages linked to this item" heading

A few points

  • .size() is deprecated, as it doesn't actually do anything other than call length.
  • Both editLabel and editDescription check whether eb's length is one, and then use .first() anyway. Isn't this redundant?
  • Is it actually useful at all to add break; after return false; is already called?
  • editLabel is mostly a duplicate of editDescription. They could probably be fairly easily merged. Same with scrollToStatements and scrollToSitelinks.

--Yair rand (talk) 06:20, 27 August 2013 (UTC)[reply]

@Yair rand: ✓ Done first and third items. --Ricordisamoa 15:19, 12 December 2014 (UTC)[reply]
@Yair rand: ✓ Done the fourth item. About the second, I'd rather keep checks safer. --Ricordisamoa 20:43, 15 December 2014 (UTC)[reply]

This gadget breaks bookmark shortcut (⌘+D) in Safari

Please fix  – The preceding unsigned comment was added by Alex.vasenin (talk • contribs) at 13:24, 2014-06-11 (UTC).

@Alex.vasenin: should be ✓ fixed now. --Ricordisamoa 20:54, 15 December 2014 (UTC)[reply]

Shortcut for "today"

@Ricordisamoa: I have one more request that I think could fit in this gadget. Whenever you fill in dates (like I very often do with retrieved (P813)) it would be useful to be able to input "t" into the date field and have it automatically replace that with today's date. Is that something that could be implemented? Jon Harald Søby (talk) 22:36, 17 February 2016 (UTC)[reply]

@Jon Harald Søby: Honestly I don't know how to hijack those widgets. You may want to follow phab:T76859 about implementing a similar suggestion into Wikibase itself. --Ricordisamoa 16:26, 18 February 2016 (UTC)[reply]
@Ricordisamoa: Ah, it would be even more useful as a standard feature. Thanks for the link! 😊 Jon Harald Søby (talk) 21:42, 18 February 2016 (UTC)[reply]

Description with D not working

Hi, keypress D leads to Label field. But i dont know why. :/ Thanks! --Frettie (talk) 09:40, 28 December 2019 (UTC)[reply]

It is requested that an edit or modification be made to this protected page.

The page has been added to Category:Wikidata protected edit requests.

Administrators: Please apply <nowiki> or {{Tl}} to the tag after the request is fulfilled.

Bargioni has requested a new shortcut for scrolling to the Identifiers section; his code uses the J key but a different one may be agreed upon. A sysop who is acquainted with JS may add

	scrollToIdentifiers = function () {
		scrollHelper( $( '#identifiers' ) );
	},

either before or after

	scrollToStatements = function () {
		scrollHelper( $( '#claims' ) );
	},

and

				case 74: scrollToIdentifiers(); return false; // J

after

				case 73: scrollToSitelinks(); return false; // I

--Ricordisamoa 17:56, 15 March 2020 (UTC)[reply]