StrokesPlus.net
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
ladostroke  
#1 Posted : Sunday, April 9, 2023 3:44:37 PM(UTC)
ladostroke

Rank: Newbie

Reputation:

Groups: Approved
Joined: 4/9/2023(UTC)
Posts: 2
Denmark

First of all, loving the software, so a big thanks to Rob for keeping it up and running. BigGrin

I have a bit of a weird issue and I'm hoping someone can point me in a direction or maybe even offer a solution.

Firefox has a function for Picture-in-Picture, which is used to pop out a video so it exists in it's own always-on-top window, so you can easily keep it open alongside other windows.
Here is a quick intro on the feature.

The Picture-in-Picture feature comes with it's own keyboard shortcut for activation:
Code:
 Ctrl + Shift + ] 


Which is awesome, because that means I can make a gesture for it and activate it trough that instead.
So I've made a gesture with a Send Hot Key step, with the following keys:
Code:
LCONTROL+LSHIFT+OEM 6

And it works great when I have my keyboard layout set to English, but it stops working when I change my keyboard layout to Danish (Which I unfortunately need to do).
We unfortunately don't have square brackets as a default key on our keyboard layouts, so the gesture shortcut stops working.

The Danish layout looks like this.
In order to make square brackets on a Danish keyboard I have to press Ctrl + Alt + 9 or AltGr + 9 which doesn't work with the shortcut. Eg. pressing Ctrl + Shift + Alt + 9 doesn't activate the PiP feature.

It looks like the OEM 6 keycode from the Send Hot Key becomes å instead, a special Danish character. I'm wondering if anyone has any great ideas to circumvent this issue?
I've also tried using a scripted Sendkeys with the bracket character:
Code:
sp.SendKeys('+^{]}');

But I'm guessing that gets parsed trough and turned into the keycode down the pipe and then also turned into the å key. It works on English layout but not Danish.

As I'm writing this post I just thought about scripting a "change keyboard layout to English" as part of the gesture before the shortcut gets fired off but it seems overkill and an inelegant solution, it also doesn't seem like an instant switch when I do it manually so I would worry about the timings if that was the supposed solution.

Mozilla are aware of the issue with the keyboard shortcut not being available to certain countries locales, and it is an active bug on their tracker, but it has been on there for 3 years, so I don't have much faith that they'll solve it anytime soon.
Rob  
#2 Posted : Sunday, April 9, 2023 8:23:55 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
What would be a good hotkey to use which would work in Danish and English layout, while not conflicting with another Firefox hotkey?
ladostroke  
#3 Posted : Sunday, April 9, 2023 9:21:52 PM(UTC)
ladostroke

Rank: Newbie

Reputation:

Groups: Approved
Joined: 4/9/2023(UTC)
Posts: 2
Denmark

Pretty much anything other then the square brackets and the larger/less than signs would be better..
I linked the Danish layout in my original post, most of the keys are the same. I couldn’t find a way to easily change the shortcut in Firefox unfortunately.
Rob  
#4 Posted : Monday, April 10, 2023 12:24:46 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
Well - try as I might - it seems I am unable or cannot figure out how to successfully compile and deploy a language pack for Firefox.

I downloaded the Firefox source and setup a build environment, but just doesn't seem to be taking my changes.

If you look here:

https://searchfox.org/mozilla-central/source/browser/locales/en-US/browser/browserSets.ftl

And search for picture-in-picture-toggle-shortcut, you can see where ] is defined, I changed it in my local source and built, built langpack, packaged, etc.

But every time I run the compiled version, it's still Control+Shift+]

So sadly, I don't have any other suggestions at this point, other than changing the keyboard layout, which is really a hack of a solution. I looked through the forum as I thought there might have been some example for changing the current layout, but nothing was jumping out at me.
Critical Hit  
#5 Posted : Thursday, May 4, 2023 5:01:24 PM(UTC)
Critical Hit

Rank: Newbie

Reputation:

Groups: Approved
Joined: 5/3/2023(UTC)
Posts: 2

Originally Posted by: ladostroke Go to Quoted Post
But I'm guessing that gets parsed trough and turned into the keycode down the pipe and then also turned into the å key. It works on English layout but not Danish.

You need a key remapper for this that can work regardless of your keyboard layout.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.