Hello, just searched for this topic
. Can’t find any build-in implementation, so just whipped this up. You can paste something like this into your browser’s console (once per session), or put it into a greasemonkey script (match to https://bunpro.jp/learn* and https://bunpro.jp/vocabs*).
document.addEventListener('keydown', e => {
if (e.key.toLowerCase() === 'p') {
document.querySelector('.flex.items-center.gap-4.text-primary-accent').click();
}
});
It looks for the user pressing lower or uppercase ‘p’ (just takes the press and converts to lowercase) on that button. If the DOM updates, that query selector will go out of date and you’ll have to find the new unique class selector (right click and inspect on the play button), and there’s a more robust way to do it with doing a regex match of the pitch accent text above it and traversing down the tree a bit… but, this is quick 'n dirty and just works. Hope it helps! Hands get to stay on the keyboard!
Oh, and to unbind it, you can add a handler name and set another key to unbind it, but it’s easier to just refresh the page. That works for now, but if the SPA functionality increases, you can hard refresh with (control + shift + R) or simply close and reopen the window.