Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh shortcut #203

Closed
sjaakvelthoven opened this issue Jan 24, 2016 · 7 comments
Closed

Refresh shortcut #203

sjaakvelthoven opened this issue Jan 24, 2016 · 7 comments

Comments

@sjaakvelthoven
Copy link

Hello,

  • First of all I really really appreciate the work that is being done on this project. I use it on a regular basis. I like to used keyboard shortcuts a lot and it is getting a little bit redundant to click everywhere.
    I have no idea how much work it is but I would really appreciate it if shortcuts like backspace for last page and cmd/ctrl r for the refreshing of pages. (I noticed the refresh button was added in the newest version and use it all the time now. Before I used to change between top and streams to refresh.)

  • I also really like that you can start the chat in different programs and set them as default. This request is less important but when I open a second chat in chatty it opens up a new instance a every time. It would be really nice if it could open as a new tab within the same instance.

    Kind regards from Norway

@bastimeyer
Copy link
Member

Hi, thanks!

I noticed the refresh button was added in the newest version and use it all the time now

The refresh button is already available since v0.5.0 and refresh shortcuts have also been implemented a while ago, so they actually are not new.

For the back and forth navigation I wish I could add mouse4 and mouse5 bindings, but this can't be done in NWjs (see #180). Keyboard shortcuts for this and also other things like modal popups still need to be worked on though. But yeah, backspace and shift+backspace could of couse be added.

It would be really nice if it could open as a new tab within the same instance

You need the latest chatty version. I'm not sure if this is still beta or not, but the author has added a single instance mode just recently. The GUI already tells you to use a greater version than v0.8.2b2. 😑

@sjaakvelthoven
Copy link
Author

Wow. A lot of these things have been taken into consideration already.
I installed the beta version of chatty and it fixed the issue I was wondering about worked immediately.
Too my surprise I also noticed that the backspace and shift - backspace shortcuts worked all along.
Refreshing however is not working for me. I have included my about page because that might help.
Looking at the code I supposed the metaR section is what applies to me?
I saw that F5 was also an option and tried fn-F5 (F5 is lowering brightness by default) and that works to refresh the page. I can therefore tell that cmd-r is not work.

"about" page.
http://imgur.com/jVbmN9z

@bastimeyer
Copy link
Member

the backspace and shift - backspace shortcuts worked all along

The shortcuts are working only on Windows and OSX, NWjs does not support these by default on Linux for some reason, so they still need to be added here...

I have included my about page because that might help

Telling the version is usually is enough 😃

Refreshing however is not working for me.

Well, I can hardly believe that this is an issue with the application code. There's nothing special going on here, just the normal DOM KeyboardEvents, although the deprecated keyCode property is being used, but this shouldn't be an issue...

However, you could try to debug the application and see what keys are being captured. Open the app (from the font rendering in the screenshot I can see that you're on OSX, right?) with the --remote-debugging-port=8888 parameter (open -a /Applocations/Livestreamer\ Twitch\ GUI.app --args --remote-debugging-port=8888). Then open http://localhost:8888 in your browser and click on "Livestreamer Twitch GUI" to see the developer tools. Go to "Sources" and expand the "Event Listener Breakpoints" list on the right. Check the "keyup" checkbox and then when you press any key, it will pause the execution of the app and it then let's you see the event variable under the "scope" menu above. I'd like to know which values the keyCode and keyIdentifier properties of the event have. Thanks...

the metaR section is what applies to me?

Ctrl+R and Meta+R should both work on OSX.

fn-F5

The "Function modifier" key on notebooks is something special and is no real modifier. It just changes the codes of the buttons while pressing it. A button for changing the brightness or changing the volume can also be added to a keyboard without a function modifier...

@sjaakvelthoven
Copy link
Author

Good to know about how fn works.
I did what you asked.

http://imgur.com/oHOEY8w

@bastimeyer
Copy link
Member

keyCode=91, metaKey=false... Are you sure you pressed Meta+R (Cmd+R) / Super+R / Win+R?
91 means OSLeft, you can see this here and here. Pressing a modifier key will only trigger a KeyboardEvent when you don't press any other button after a couple of milliseconds (half a sec or so). Maybe you have missed this time span.

These values are independent from the used keyboard layout, so it should behave equally on each system.

What about Ctrl+R and F5?

@sjaakvelthoven
Copy link
Author

Ah you are right. That is what I was doing wrong! It works with control.
I am sorry. It is just that I never use the actual control key because most programs I use have their bindings bound to the OSLeft key and the control key is out of the way. Thank you so much for helping me with this and I am glad I even got it to work perfectly with chatty 👍

@bastimeyer
Copy link
Member

That is what I was doing wrong! It works with control.

No, I think there's something wrong with NWjs, I just figured it out... It doesn't trigger any KeyboardEvents when you're pressing Cmd+R. It just triggers the modifier key itself instead of the combination. This basically means, that #152 doesn't work, although it's supposed to work, see here.
I also tried simulating the Cmd/Meta modifier key in combination with R, but R doesn't get triggered at all while the Cmd key is being pressed. That's why I think it's a NWjs issue.

Let me see if this can be fixed by using NWjs shortcuts...

bastimeyer added a commit that referenced this issue Jan 27, 2016
Unregister global shortcut when the application loses focus...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants