fixed issue #651 - Keyboard Shortcuts #899

Merged
merged 1 commit into from May 7, 2015

Projects

None yet

2 participants

@samranjbari
  • Modified the Glimpse.axd to allow for disabling the shortcut keys. The checkbox is placed under more details link
  • Implemented the keys below
    var shortcutKeys = {
    Maximize: '103', // G
    Minimize: '103', // G (toggle)
    Popup: '112', // P
    Help: '63', // ?
    Close: '120', // X
    }
@avanderhoorn
Member

@samranjbari This is looking great! Sorry for the delay in getting back to this, got a new baby and been taking time out. Just wondering what browsers you have tested on? Also I'm afraid to say that the changes for the glimpse.js need to go over here - https://github.com/glimpse/glimpse.client/. Hopefully this will be a bit easier to work with. To build the client, assuming you have node installed, you just need to run node make. Really great effort and looking forward to getting this in!

@avanderhoorn avanderhoorn added this to the vNext milestone May 6, 2015
@avanderhoorn avanderhoorn self-assigned this May 6, 2015
@samranjbari

@avanderhoorn Congrats on the baby!! I tested on IE8>, chrome and FF all windows through browserstack. I can do more testing if needed.
I'll look into moving the changes.

@avanderhoorn
Member

Thanks for letting me know about the tests. Sounds like more than we need ;) and appreciate you getting the change back into the client. I've gotten the release ready to go otherwise (5630c5e). After that, all that is left is if you could sign the CLA and send it to me at anthony.vanderhoorn at the google place.

@samranjbari

@avanderhoorn moved the changes to Glimpse.Client and requested a pulled.

@avanderhoorn
Member

Great stuff!!! As soon as I get the CLA I'll get this in and the release out... currently working on the release notes, etc.

@avanderhoorn avanderhoorn merged commit ecbf819 into Glimpse:master May 7, 2015

1 check passed

default Finished TeamCity Build Glimpse :: Continuous Integration : Tests passed: 942, ignored: 10
Details
@samranjbari samranjbari deleted the samranjbari:shortcutkeys branch May 7, 2015
@avanderhoorn
Member

Found an issue in testing. When you are focused in a input and type any of the targeted keys, they come into effect. This means that when typing something like "gaggle of geese?", all sorts of things start to happen. This means we probably need to make it a combination key or know when any input is focused.

@avanderhoorn
Member

We probably need to use a method like this - http://jsfiddle.net/bM6uY/4/:

$(document).bind('keypress', function(event) {
    if( event.which === 65 && event.shiftKey ) {
        alert('you pressed SHIFT+A');
    }
});
@samranjbari

I thought that was the purpose of the disable shortcut keys option. So they can disable the option in case of form controls.
What if they need to type upper case G in their text box? wouldn't this snippet still run?

@avanderhoorn
Member

With the exact sample I provided yes :) but we could use cntr or alt? Using either of these means that it would only be a problem if they had something that used those exact control combination... they shouldn't come across that problem in normal typing.

@samranjbari

ok, I will update the key mapping

@avanderhoorn
Member

Thanks!

@avanderhoorn
Member

Just wondering if you have had any luck with this? Its the last thing we are waiting on before being able to release.

@samranjbari

I'll get on it this weekend. Thanks for checking in

@avanderhoorn
Member

Really appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment