Skip to content
This repository has been archived by the owner on Jun 20, 2020. It is now read-only.

Shortcuts dont work #34

Open
ShalokShalom opened this issue Jun 15, 2017 · 16 comments
Open

Shortcuts dont work #34

ShalokShalom opened this issue Jun 15, 2017 · 16 comments

Comments

@ShalokShalom
Copy link

Shortcurts like "Press g, then 0/- within one second of each other." make the zoom larger/smaller here in Opera.

@Mottie
Copy link
Member

Mottie commented Jun 15, 2017

Hi @ShalokShalom!

I just tested this on Opera 45.0.2552.898 (PGO) on a Windows 10 64-bit system and the shortcuts are working for me.

From your other issue I'm guessing you see this issue in Opera for KaOS? With two reported issues, I'm wondering if the userscript manager is working as expected?

@Mottie
Copy link
Member

Mottie commented Jun 21, 2017

Is this still an issue?

@ShalokShalom
Copy link
Author

It works now, while g- does also disable the dark theme at all now.
Same thing in Firefox, while it does not zoom even there.

@Mottie
Copy link
Member

Mottie commented Jul 5, 2017

Sorry for the delay in followup... would you please elaborate on what this means:

Same thing in Firefox, while it does not zoom even there.

I don't know what you mean about it not zooming?

If everything works, can I close this issue?

@ShalokShalom
Copy link
Author

In Firefox, g- disables the theme, while your wiki means, its supposed to enable the settings menu:
https://github.com/StylishThemes/GitHub-Dark-Script/wiki#enable-github-dark

@ShalokShalom
Copy link
Author

Same thing in Opera, while it zooms out there as well. So Page zoom out plus disablement of the Script, instead of an access to the settings.

@Mottie
Copy link
Member

Mottie commented Jul 6, 2017

I can not duplicate what you're describing... are only the g and - keys being pressed – separately but within one second of each other? Are you using the keypad - or the one in the number row? It shouldn't matter, but I'm asking just in case.

The only way I get the zoom to work is if I hold down the Ctrl key (Windows).

@ShalokShalom
Copy link
Author

within one second of each other and the number row, possible just on Linux

@Mottie
Copy link
Member

Mottie commented Jul 10, 2017

Would you try editing the userscript and try some different key combinations?

Look at lines 36-37 and modify them as desired:

// Keyboard shortcut to open ghd panel (only a two key combo coded)
keyboardOpen = "g+0",
keyboardToggle = "g+-",

It's not set up to allow you to enter stuff like "ctrl+F1", just single letters and numbers.

If it isn't the keys themselves, maybe it is because the script is bound to the document (see line 973) and listening for "keypress" and "keydown"... Maybe try switching that to document.body and see if that fixes the problem.

on(document.body, "keypress keydown", event => {

Sorry I can't be of more help... I don't have any systems running Linux to test these changes.

@ShalokShalom
Copy link
Author

I changed it to g+b and g+f and it doesnt do anything on Grease at Firefox now:
screenshot_20170710_203744

@Mottie
Copy link
Member

Mottie commented Sep 1, 2017

Sorry for not getting back to you on this issue. It sounds like Linux is interfering with the script. I don't have any way to troubleshoot and solve this problem.

@ShalokShalom
Copy link
Author

ShalokShalom commented Sep 1, 2017

And now? I also set document.body

@Mottie
Copy link
Member

Mottie commented Sep 1, 2017

I was trying to ask that if you're still using this script, are you able to troubleshoot the event listener?

Are the "keypress" or "keydown" events firing? I just updated the script to check the event.key instead of processing event.which. Maybe that will fix the issue? If not, would you please add a console.log after the changed line to see what key is being reported?

@ShalokShalom ShalokShalom changed the title Shortcuts dont work on Opera Shortcuts dont work Sep 2, 2017
@ShalokShalom
Copy link
Author

I use the current Github version 2.2.7 and its still happening.
Can you give me a specific command? Under which specific line?

NOTE: As stated: g/- as an example work, in the wa that it triggers the Script on and off.
The zoom out happens additionally.

@Mottie
Copy link
Member

Mottie commented Sep 2, 2017

And what happens when you switch the keys to "g+b" and "g+f"?

@ShalokShalom
Copy link
Author

#34 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants