Re: Floating Action Buttons

On 07/07/2020 19:29, Mike Elledge wrote:
> Hi Jonathan--
> 
> I like the idea of using JavaScript to provide a mechanism for invoking 
> a Floating Action Button, in addition to ensuring it's available through 
> fixed navigation.
> 
> My knowledge of JS is limited, but I assume it would listen for a 
> particular keystroke combination and then trigger an action.
> 
> Is there a keystroke combination you recommend?

As I mentioned F6 already as a relatively standard keystroke for moving 
between panes/zone of interest in an application, or to jump in/out of 
non-modal dialogs, here's an absolute bare bones way of reacting to it in JS

document.addEventListener("keydown", function(event) {
   if (event.keyCode == 117) {
     /* F6 was pressed - set focus to the FAB? */
   }
})

This will obviously need much more refining.

P
-- 
Patrick H. Lauke

https://www.splintered.co.uk/ | https://github.com/patrickhlauke
https://flickr.com/photos/redux/ | https://www.deviantart.com/redux
twitter: @patrick_h_lauke | skype: patrick_h_lauke

Received on Tuesday, 7 July 2020 19:22:47 UTC