question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bind ESC key to collapse map

See original GitHub issue

When clicking Map from the menu, the map slides out. The only way to collapse it again is using the X.

client/main.js:298 $('.map-aside-action-collapse').on('click', collapseMap);

Would an event handler that fires on keyup for ESC key work?

This is a wish list item. Mostly I wanted to see if I could locate where in the code this happens. Thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
BerkeleyTruecommented, Nov 28, 2016

@systimotic You might want to hold off. We are in the process of removing all the sidecar related drawers. Oh sorry looks like I wasn’t quick enough. I’ll close this to prevent others from creating PR’s for this.

2reactions
erictleungcommented, Jul 4, 2016

@jboxman this has been an intuitive thing for me to want to do too. I’ve put this code underneath the one you’ve cited and tested it and it works.

$(document).keyup(function(e){
  if (e.keyCode === 27) collapseMap();
});

This could also be done with the Wiki around Line 336.

$(document).keyup(function(e){
  if (e.keyCode === 27) collapseWiki();
});

And also the main Gitter chat

$(document).keyup(function(e){
  if (e.keyCode === 27) collapseMainChat();
});

@FreeCodeCamp/issue-moderators good to add? If there’s a better way, please comment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Closing menu with escape key - javascript - Stack Overflow
What I want to achieve is to have it close using escape key as well. Would appreciate any help I can get. Below...
Read more >
Avoid the escape key | Vim Tips Wiki - Fandom
This tip discusses how to exit from insert mode without needing to press Esc. The Vi editor was originally written on an ADM-3A...
Read more >
readline / bash: How to map Escape key and Arrow keys?
My question: Is there a way to make this work? One possibility would be timing-based, i.e. if \e is followed quickly by another...
Read more >
Visual Studio Code Key Bindings
Here you will find the complete list of key bindings for Visual Studio Code and how to change ... especially around overloaded keys,...
Read more >
Screen User's Manual - GNU.org
Reorders window on window list, removing number gaps between them. See Collapse. command [-c class ]. Simulate the screen escape key. See Command...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found