Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3344278
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:03:04+00:00 2026-05-18T01:03:04+00:00

Am I right in thinking that spam bots can’t simulate the ‘keypress’ event, and

  • 0

Am I right in thinking that spam bots can’t simulate the ‘keypress’ event, and thus I can’t get spammed if I require a keypress for each field in my contact form before being able to submit it?

Is this a good alternative to captcha, etc. if I don’t care whether or not my viewers have JavaScript enabled?

Wizards, set me right.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T01:03:04+00:00Added an answer on May 18, 2026 at 1:03 am

    I’m unsure if they can generate the keypress event “natively” (I think you might be right that they can’t, but it wouldn’t surprise me to learn that there’s some edge case whereby this is possible).

    However, I don’t think they would have a problem merely executing element.onkeypress() directly. If the bot can determine that it needs to press a key to advance, then what that actually boils down to is that a particular event handler method needs to be invoked – and the bot can do the latter. It can create its own fake Event object too containing the keycode, and then pass this in and/or set it on window.event.

    In theory you might be able to detect this by being very strict about instrospecting the event object in your handler. I don’t think that the bot would easily be able to create a native-equivalent event object, so perhaps by inspecting the prototype chain you could distringuish between the two. However, this would almost certainly be too fragile for general use, and is not going to reliably work across different browsers/environments/plugins/etc.

    Thus I don’t think this is a fruitful path, because you can’t tell in an event handler whether the event is “real” or not. Browser-native code is different, since bots cannot actually trigger a click event, but within Javascript I don’t see a simple way to prevent your method from simply being called.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right now, I keep all of my projects on my laptop. I'm thinking that
Right now I'm thinking write the paths to a file in the pre-build event
Am I right thinking that Tigris.org have stopped maintaining their SVN binary package for
Am I right in thinking that until I am able to afford dedicated servers
Am I right in thinking that this may not be the best idea: private
Am I right in thinking that in Zend Framework, if I plan to have
Am I right in thinking that the HTML5 peertopeerconnection() for enabling peer to peer
Quick one; am I right in thinking that passing a string to a method
Am I right in thinking the full name of the LSP is the Liskoff
What are the different types of encapsulation? Am I right in thinking this basically

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.