Shortcut to select next item in a list
Solution 1:
If you look "closer" at the fonts/names in the dropdown list you'll find they are being handled by server:"patorjk.com/software/taag/#p=display&f=Rectangles&t=Hello\ world!"
The option group's name (html) is "optgroup label="Featured FIGlet Fonts", one font e.g.:<option value="Rectangles.flf">Rectangles</option>
Therefore I assume they are sent by/to script<script type="text/javascript" src="./js/figlet.js"></script>
It is certainly possible to delve deep into JavaScript and trace whatever commands it takes to solve this.
Actually I "studied" this page, tried AppleScript with/and Karabiner, but the list's behaviour is so "nervous** " that in the end I settled for a pure Automator/AppleScript solution:
tell application "System Events" to tell process "Safari"
if name of front window of application "Safari" is "Text to ASCII Art Generator (TAAG)" then
key code 125 --down…
delay 0.1
key code 125
key code 36
end if
end tell
Actually this "just-so-working" code presumes you have selected the list, then press the shortcut shortly, let go, press shortly, let go, ...
(** AS/Karabiner, via osascript, worked nicely & quickly – but only circled through fonts with same 1st letters … very irritating, possibly due to some settings in the js-script.)
Now if this particular page is really important to you, try this: open Automator, goto
File>New>Service / left window: Execute AppleScript / top lists L/R: No input / Safari (any browser).
Paste above code into window. Safe as "Fonts-down" (for "going up" replace "125" with "126").
Final step: open Sys-Press Keyboard Shortcuts Services (left) scroll-down to "Fonts-down", check and input your chosen shortcut (e.g.: Opt-D). It should now appear as (menu) Safari>Services>Fonts-down.
(Depending on your general settings you may have to ONCE "allow" this script in Sys-Prefs.)
Okay.
– This script will only work in the specified window (important)
– If you press too long (try it) fonts may be skipped
– Sadly you'll have to choose a multi-key combo in Sys-Prefs keyboard, like Opt-D (Opt-U for "up"?)
(If you use Karabiner you may define a 1-key shortcut to call "Opt-D".)
– This page is difficult to handle as its displayed content is created server-side.