473,796 Members | 2,690 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Detect CTRL + V

Hello,

How can I detect the press of CTRL + V in an input of type text?

TIA,

Leonardo

Jul 23 '05 #1
4 5186


le**********@gm ail.com wrote:

How can I detect the press of CTRL + V in an input of type text?


IE/Win has
<input onpaste
onbeforepaste
see
<http://msdn.microsoft. com/library/default.asp?url =/workshop/author/dhtml/reference/events/onpaste.asp>
<http://msdn.microsoft. com/library/default.asp?url =/workshop/author/dhtml/reference/events/onbeforepaste.a sp>

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2
le**********@gm ail.com wrote:
Hello,

How can I detect the press of CTRL + V in an input of type text?


Why do you want to detect all pressings of this key combination,
regardless of what it's assigned to do on the user's browser/OS combination?

It doubt it's possible, but still....

Stewart.

--
My e-mail is valid but not my primary mailbox. Please keep replies on
the 'group where everyone may benefit.
Jul 23 '05 #3
Stewart Gordon wrote:
--
My e-mail is valid but not my primary mailbox. Please
keep replies on the 'group where everyone may benefit.


I like that. However, sometimes private communication is better (as would
apply for this posting, q.e.d.), so you should include your primary mailbox
in the Reply-To header. From my now four years of regular Usenet
experience, it is highly unlikely that spambots will access that header.
PointedEars
Jul 23 '05 #4
JRS: In article <54************ ****@PointedEar s.de>, dated Sun, 15 May
2005 18:07:03, seen in news:comp.lang. javascript, Thomas 'PointedEars'
Lahn <Po*********@we b.de> posted :
Stewart Gordon wrote:
--
My e-mail is valid but not my primary mailbox. Please
keep replies on the 'group where everyone may benefit.


I like that. However, sometimes private communication is better (as would
apply for this posting, q.e.d.), so you should include your primary mailbox
in the Reply-To header. From my now four years of regular Usenet
experience, it is highly unlikely that spambots will access that header.

Your experience is limited; your advice misleading; your maturity long-
awaited; your naivety impressive.

One does not really care whether spambots will access that header; one
cares about whether spam will be sent to an address given to the world
only in Usenet Reply-To headers.

Usenet Reply-To headers get in News article sets in personal computers
(however, in Turnpike they are encrypted); if used for replies, or if
saved as potentially useful, or if otherwise stored, they can be picked
up by malware and used for sending spam and virus mail. And I can
assure you that this can happen within a day or two; the French have
demonstrated this recently.

One should not present in News any E-address that one wants to use in
perpetuity - and one should present only addresses that one is entitled
to present.
In this 60th anniversary year - indeed, in this anniversary month, would
it not have been well for you to eschew the attitudes of your presumed
predecessors?

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 MIME ©
Web <URL:http://www.uwasa.fi/~ts/http/tsfaq.html> -> Timo Salmi: Usenet Q&A.
Web <URL:http://www.merlyn.demo n.co.uk/news-use.htm> : about usage of News.
No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
20468
by: Scott Shaw | last post by:
Hi all, I was wondering if you could help out with this problem that I am having. What I am trying to do is detect keyboard input in a while loop without halting/pausing the loop until the key is pressed (without hitting return). I looked at serveral faq's on the net and installed the cspan readkey module and neither seems to work most likey its me since I am getting frustrated. but anyway here's a sample code. while (1) { if...
0
1113
by: lastusernameleft | last post by:
to what would i attach a key event handler to detect a user pressing ctrl break to escape a hanging process? a function of an admin tool i've made allows the browsing of a remote machine's c drive, but hangs when the machine is offline. i know i could ping the machine first but that would be additonal overhead to a very simple process.
1
2015
by: PL | last post by:
I read password from the console with _getcch to display no echo. The problem is that I don't know how to flush extended char and ignore them, like control+A, ... In fact, I want to detect the Ctrl+C sequence in order to stop the input. How can I do that ? thanks
3
6797
by: Kubik | last post by:
Hello! How to detect mouseclick anywhere on the form? There is a lot of controls on the form, so I don't want to add eventhandler for each of them. How can I do it in another way? Adam -- **remove REM from the mail address**
2
2496
by: Steph. | last post by:
Hi, A simple question : How can I detect if the CTRL key is pressed when User click on a control ? Thanks, Steph.
2
5045
by: Justin | last post by:
I'm creating a kiosk type application and this would be too simple for someone to figure out: Private Declare Function GetAsyncKeyState Lib "user32" ( ByVal vKey As Short) As Short Const VK_ESCAPE As Short = &H1B How can I upgrade this to detect multiple keystrokes? For example CRTL + E Any points in the right direction would be much appreciated. VB.NET 2005
1
2482
by: mark4asp | last post by:
<!-- // How to detect the rendering mode which the browser is currently in (works for IE6). // Ctrl+Shift+s displays indicates whether the browser is in quirks or standards mode. // Detect keypress var captureKeys = function(ev) { ev = ev || window.event; // gets the event in ie or ns kCode = ev.keyCode || ev.which; // gets the keycode in ie or ns
24
9305
Mague
by: Mague | last post by:
Hey, Im a 13 yr old who needs help. I need a code which can detect if Ctrl R has been pressed. I cannot use e.key thingy because i have got text box on mi page so that doesnt work. I also need it to beable to be pressed and detected when my file is minimized If someone could help i would apressate it ty Mague
4
8501
by: vunet | last post by:
When user enlarges font with Ctrl+ I want to increase the dimensions of my fixed sized div. IE7 uses zoom-in, so it will increase div dimensions automatically. Firefox, however, increases font only, not div element. I thought to implementing this by checking if my div width or height changed and then resize it. But this approach did not work: div.addEventListener('resize', someFunc, false); Please advise. Thanks
0
9679
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10453
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10172
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9050
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.