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

Developer tools: most shortcuts don't work (OS Windows) #1597

Closed
GHSoCoder opened this issue Feb 21, 2014 · 4 comments
Closed

Developer tools: most shortcuts don't work (OS Windows) #1597

GHSoCoder opened this issue Feb 21, 2014 · 4 comments
Labels

Comments

@GHSoCoder
Copy link

I'm working with automation, so I need shortcuts. Most of the shorcuts don't work. And it's not possible to select the main menu items via [Alt+_] combinations. I'm a Windows user.
Thanks for any hints.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@TheJaredWilcurt
Copy link
Member

I'm working on a framework to help assist those starting with NWJS. It's aimed specifically at those creating a GUI for CLI. However there are many toys and tools I'm throwing in there just to make life easier for any NWJS developer. One of these is keyboard shortcuts. I'm not 100% sure what you're requesting, but I have the following shortcuts created and usable with copy/paste:

  • F5 Soft Refresh
  • Shift+F5 Refresh ignoring cache
  • CTRL+F5 Hard Refresh
  • F12 or CTRL+Shift+I Open Webkit's Developer Tools

My project is called UGUI (Universal GUI). It is not to version 1.0 yet, but should be there in the next 7-12 days. One of the finishing touches I need to put on it is testing the keyboard shortcuts in linux and osx. Right now they only work in Windows.

//get node webkit GUI - WIN
var gui = require('nw.gui');
// get the window object
var win = gui.Window.get();

//Keyboard shortcuts
document.onkeydown = function (pressed) {
    //Check CTRL + F5 keys and hard refresh the page
    } else if ( pressed.ctrlKey === true && pressed.keyCode === 116 ) {
        pressed.preventDefault();
        win.reloadDev();
        return false;
    //Check Shift + F5 keys and refresh ignoring cache
    } else if ( pressed.shiftKey === true && pressed.keyCode === 116 ) {
        pressed.preventDefault();
        win.reloadIgnoringCache();
        return false;
    //Check F5 key and soft refresh
    } else if ( pressed.keyCode === 116 ) {
        pressed.preventDefault();
        win.reload();
        return false;
    //Check F12 or Ctrl+Shift+I and display Webkit Dev Tools
    } else if ( pressed.keyCode === 123 || pressed.ctrlKey === true && pressed.shiftKey === true && pressed.keyCode === 73 ) {
        pressed.preventDefault();
        win.showDevTools();
        return false;
    }
}

The file that his comes from is here:

I'm going to be updating the code very soon to make it a switch instead of if/else, and to detect what OS platform you're on and use the correct keyboard shortcuts for each OS.

@GHSoCoder
Copy link
Author

Hello TheJaredWilcurt,

many thanks for your answer. I will take a look in your project asap.

The shortcuts I'm missing are the ones mentioned here in section "Sources Panel":
Keyboard Shortcuts - Google Chrome
https://developer.chrome.com/devtools/docs/shortcuts

Especially those for stepping, go to line and so on.

Pls. contact me via PM.

Many thanks and greetings
GHSoCoder

@TheJaredWilcurt
Copy link
Member

There is no way to message users directly on GitHub. This feature was removed. If you think that was a dumb idea, like I do, at the bottom of the page, click Contact and send them a message requesting the feature be brought back.

That page lists like a million shortcuts. I'm pretty sure most of these are possible with the current version of nw.js. I'm just creating a function that detects key presses and runs built in features listed on the nw.js documentation.

@stale
Copy link

stale bot commented Sep 30, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 30, 2017
@stale stale bot closed this as completed Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants