ブラウザ上でEnter入力をTab入力をに変換するための設定を載せておきます。
Firefox/Chrome拡張のTampermonkeyを入れておいてください。その上で動きます。コメントも消さないでください。
// ==UserScript==
// @name Enterブラウザ
// @namespace http://tampermonkey.net/
// @version 0.1
// @description EnterキーをTABに変換
// @author hatonosu
// @match *hogehoge.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
document.addEventListener('keydown', function(event) {
if (event.key === 'Enter') {
const focusableElements = Array.from(document.querySelectorAll('input'));
const currentIndex = focusableElements.findIndex(el => el === document.activeElement);
const nextIndex = (currentIndex + 1) % focusableElements.length; // 次の要素に移動
focusableElements[nextIndex].focus();
event.preventDefault(); // デフォルトのENTER挙動を無効化
}
});
})();
返信がありません