You are not logged in.

#1 2015-04-23 11:13:40

PieterGen
Member
From: Groningen, NL, EU
Registered: 2012-01-18
Posts: 59

Flash stealing my browser keyboard shortcuts

Any hints on how to solve this weird bug - or is it a feature? Normal behaviour in Firefox & Chrome is:
- hitting SPACE means "scroll page down"
- SHIFT + SPACE means "scroll page up"
- ALT + leftarrow means "go back" (same as BACKSPACE)
- ALT + rightarrow means "go forward" (same as SHIFT+BACKSPACE)

Flash seems to steal shortcuts:
- in Youtube, SPACE toggles between play and pause
- in Flash caroussels (let's say you have a 5 step animation) alt-arrow will take me to the next/previous picture
I see this in both my Linux installs (Arch/Openbox; Mint/Cinnamon).  (BTW, it's also in my Windows box, but let's ignore that for the moment). Of course, this is a minor "Foss world problem" but still, where would I look for a solution? I see three routes:

A. Via the window manager (wm).
- The wm should determine which window, or even which part of the window has focus (the part with the flash animation or not)
- The wm should overrule applications in matters of screensize, browsing etc.
Thus, playing with wm's settings (or changing its rules) could prevent this flash ' feature'
B. Via flash
- somewhere in the flash code, the shortcuts are defined (right?). This would mean I'd have to modify the Flash code, recompile and run it without this ' feature'
C. Via the browser
- the browser should not give flash the room for this behaviour

Question: am I on the right track here? Which route is most promising to put some work in? Thanks

Edit: the problem is real, I found on stackoverflow after posting here. Sorry for not doing my research before. No clear cut solution anyway, so my question remains.

Last edited by PieterGen (2015-04-23 11:19:56)

Offline

#2 2015-04-23 14:30:15

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,548

Re: Flash stealing my browser keyboard shortcuts

This is a known problem with firefox and awesome wm.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#3 2015-04-23 19:39:39

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: Flash stealing my browser keyboard shortcuts

As nomorewindows said, this is to be expected. Firefox gives focus to embeded content (plugins), and there's nothing you can do about it. I don't know how Chrome handles plugins.

Offline

#4 2015-04-23 21:42:59

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,422
Website

Re: Flash stealing my browser keyboard shortcuts

Yep, it's a known issue even in Windows or MacOS. Conkeror has a "workaround" for this:

http://conkeror.org/UpstreamBugs#Focuse … om_working


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#5 2015-04-23 21:48:43

kbrosnan
Member
Registered: 2010-08-18
Posts: 8

Re: Flash stealing my browser keyboard shortcuts

One partial workaround is to set all plugin content to ask to activate in about:addons in Firefox. It will prevent the plugin from stealing shortcuts unless you specifically ask to activate it.

Offline

#6 2015-04-24 07:16:12

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: Flash stealing my browser keyboard shortcuts

Some years back, I had created a bash script bound to a keybinding which used xdotool to move the mouse cursor to a different part of the screen and then send a fake mouse click to steal the focus away from flash.

B. Via flash
- somewhere in the flash code, the shortcuts are defined (right?). This would mean I'd have to modify the Flash code, recompile and run it without this ' feature'

Good luck finding flash's source code wink

Last edited by x33a (2015-04-24 07:18:07)

Offline

#7 2015-04-28 12:52:29

PieterGen
Member
From: Groningen, NL, EU
Registered: 2012-01-18
Posts: 59

Re: Flash stealing my browser keyboard shortcuts

Thanks guys. And x33a, you are right on flash's source code :-)  I'm dumb :-)

Offline

#8 2015-04-29 17:55:10

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,548

Re: Flash stealing my browser keyboard shortcuts

Just switch to HTML5.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

Board footer

Powered by FluxBB