Questions tagged [esc-key]

16 questions
14
votes
2 answers

Execute onclick of ESC Key

Briefly, my problem is that I would like to execute the effect of Esc button by a line of Javascript, for example execute an effect onclick of the Esc button. How can I do It ? [ What I have is an upload in a jQuery box, so I would like that when…
Hamza
  • 241
  • 2
  • 3
  • 8
6
votes
3 answers

How is "Esc" key handled in WPF Window?

I want the Escape key to close my WPF window. However if there is a control that can consume that Escape key, I don't want to close the Window. There are multiple solutions on how to close the WPF Window when ESC key is pressed. eg. How does the WPF…
Markus2k
  • 165
  • 2
  • 2
  • 8
5
votes
3 answers

Vim Pre-Exit (Esc Key) Command?

Right now in Vim when I go to a new line (or press 'p' or 'o' in normal mode) I get a lovely automatic indent, that also disappears if I exit insert mode without adding anything to it. Is there a way to bind something to before I exit insert mode,…
Jookia
  • 6,544
  • 13
  • 50
  • 60
5
votes
2 answers

How to close only single dialog on ESC key in WPF/WinForms?

I have a WPF form. It handles the KeyUp event and if the released key was Escape, it closes itself. Also this form has a button to show some Windows Form as a dialog. It does handle the Escape key in the same way. What happens is that when I press…
Mikhail Orlov
  • 2,789
  • 2
  • 28
  • 38
4
votes
3 answers

cancelOperation not called in NSView subclass

cancelOperation: is not being called in my bare-bones NSView subclass when I press Esc. I checked and the Esc key is received on keyDown. Also, other action messages (such as moveLeft) are being called. The view is part of a Window shown like…
hpique
  • 119,096
  • 131
  • 338
  • 476
2
votes
3 answers

Esc key not getting recognized in Firefox

For some reason this script isn't working in Firefox: document.onkeydown=function keypress(e) { if (e.keyCode == 27) { window.location = "/edit" }; }; It works fine in Chrome, but for some reason it's not working in…
JacobTheDev
  • 17,318
  • 25
  • 95
  • 158
1
vote
1 answer

jquery datepicker on esc key event

I'm trying to put a date value in the input box for the date picker when the user click on the key ESC (e.keyCode == 27) once he as open the datepicker. My test case: 1) Click on the input box, the date picker show up; 2) The user decide to cancel…
Yannick
  • 3,553
  • 9
  • 43
  • 60
1
vote
2 answers

Jpopup not working for the ESc key

in general the Esc key is used to hide the menu.. but in my case i have to show a menu on click of an Esc key. I have a combo I am doing the following public class MyFrame extends JFrame implements KeyListener{ JPopupMenu menu = new…
harshit
  • 7,925
  • 23
  • 70
  • 97
1
vote
3 answers

How to call managed bean method on ESC button?

I want to execute a method from my managed bean when I press the ESC key from the keyboard. I have read some other posts but none of them is working on my application. Maybe I am not placing the script on the right position within the page.. I…
Noah Martin
  • 1,708
  • 9
  • 35
  • 73
0
votes
2 answers

Capturing Esc Key with jQuery on Document, but Not Contents

Imagine an HTML form and the jQuery library is loaded. I'd like it such that if someone is not currently focused on a form field, and they click the Esc key, a dialog pops up to ask if they want to close the form window (because the form window…
Volomike
  • 23,743
  • 21
  • 113
  • 209
0
votes
0 answers

Safari: React-bootstrap dropdown component on esc key press dropdown menu not working i.e., not hiding

In Safari browser, React-bootstrap dropdown menu component not hiding on esc key press, Please help on how to hide the menu. import Dropdown from 'react-bootstrap/Dropdown'; function BasicExample() { return (
0
votes
1 answer

Javascript cannot capture ESC keyup event in Vivaldi browser

I am developing a Javascript library (AnyList) in which users may press the ESC key to abort editing an input field. This is implemented by catching the ESC keyup event (using jQuery): inp_elem.on("keyup", init_opt,…
Arne M
  • 87
  • 8
0
votes
1 answer

hiding grids using ESC key

I'm new to WPF. I have like 15 grids on my Window and I have a small menu on which I can click and choose which grid to show up or hide. One grid at a time only. I would like that grid to hode (fade out) when I hit Esc. I have all the animations…
Ivan
  • 101
  • 3
  • 13
0
votes
2 answers

Is it possible to detect esc key with ask function?

Would like to detect esc key to escape the forever loop in pseudo code: forever [ url: ask "Url: " if (url = esc) [ break ] ] Is this possible ?
Rebol Tutorial
  • 2,738
  • 2
  • 25
  • 36
0
votes
1 answer

Administrator DOS/CMD window, in Windows 2012 R2, is not accepting ESC key expected in C# console application

Here's the C# code snippet from the console application that works on my local Windows 8, and VS .NET 2015 environment. It also works when I run the console application in an Administrator DOS/CMD window on my local Windows 8 machine. The Console…
1
2