KirkMcDonald / kirkmcdonald.github.io

Simple web-based calculator for the game Factorio.
Apache License 2.0
553 stars 147 forks source link

Feature request: tabindex to allow tabbing in a downward direction in the inputs #144

Open timeshifter opened 5 years ago

timeshifter commented 5 years ago

i.e. if I have an all-science calculation going, and I change the desired output of red science, I'd expect tabbing to go straight down to the desired output of green science, and so on, to enable more rapid keyboard editing of all values.

Amuxix commented 5 years ago

I came here to request this exactly, I have made a tampermonkey script you can use meanwhile:

// ==UserScript==
// @name         Factorio Calculator TabIndex
// @version      0.1
// @description  Adds a tabindex to factorio calculator inputs
// @author       Amuxix
// @match        https://kirkmcdonald.github.io/calc.html
// @grant        none
// ==/UserScript==

setTimeout(() => document.querySelectorAll('#targets > li > input[type=text]:nth-child(7)').forEach(e => e.tabIndex = 1), 5000)