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 406879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:32:23+00:00 2026-05-12T17:32:23+00:00

I have a great idea about cheating on exams. My school uses very old

  • 0

I have a great idea about cheating on exams. My school uses very old IDE’s ( think Turbo Pascal, Turbo C++ , and other 80’s ones ), and the thing I’d like to do is this :

  • start my program in the background

  • intercept the keypresses, and instead of sending them directly to the screen, I’d like to read a character from a pre-configured text-file, and send that as the pressed key. This way, no matter what you’ll write, the text from that file will get written on the screen.

I found Stephen Toub’s article about logging keys, and I think it will serve as a good start on building this “tool“. Is there a better alternative to intercepting all the keys pressed in the system than SetWindowsHookEx? Will the code be flagged by the antivirus as a suspicious program? If so, is there anything else I can use to accomplish this without being flagged by the antivirus? Will administrator priviledges be required ?

I know some of you guys will say that If I’d put as much interest in learning as I do in avoiding learning, I’d do great, but I’d like to try this out.

EDIT: I’ve added a bounty, I’m interested in some techniques for capturing keystrokes ( I’m not interested in low-level hooking or advanced stuff – basic ones are fine ), mainly method names and some links to documentation. I’d also like to know if they would appear as malware to an antivirus.

  • 1 1 Answer
  • 2 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-12T17:32:23+00:00Added an answer on May 12, 2026 at 5:32 pm

    GOD! I’ve just found the perfect class for this the other day.. took me a while to find the original source:

    http://www.codeproject.com/KB/cs/globalhook.aspx

    I used this (and SendKeys) alone exactly for what you need, you’ll need to use Handle=true to block the original key message.

    SendKeys is a bit ugly… you can look for a replacement if you’d like.. but SendKeys will work for you.

    With SendKeys it’s something like:

        private void HookManager_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.D){
                e.Handled = true;
                SendKeys.Send("F");
            }
        }
    

    I actually also use this method to determined what prccess’ window is in focus, so the app will do nothing if you are on another application:

        /// <summary>
        /// The GetForegroundWindow function returns a handle to the foreground window.
        /// </summary>
        [DllImport("user32.dll")]
        static extern IntPtr GetForegroundWindow();
    
        static bool IsProcessFocused(string processname)
        {
            if (processname == null || processname.Length == 0)
            {
                throw new ArgumentNullException("processname");
            }
    
            Process[] runninProcesses = Process.GetProcessesByName(processname);
            IntPtr activeWindowHandle = GetForegroundWindow();
    
            foreach (Process process in runninProcesses)
            {
                if (process.MainWindowHandle.Equals(activeWindowHandle))
                {
                    return true;
                }
            }
    
            // Process was not found or didn't had the focus.
            return false;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Question If you have what you think is a great idea, how do you
I have different questions about a full architecture idea. I hope someone with great
I have a great problem about the rotation in three.js I want to rotate
So I've asked a couple of questions about performing joins and have had great
I have a great idea for a 3D network game, and I've concluded that
I have an idea for a web application that would be great if it
I have the great book on stunning css3 and it's talking about using src:
Hypothetical question (at the moment!) Suppose I have a great idea for an application.
I have a great idea for a biometric security app and some secure transactions,
i have no idea about the nokia app all i know it is used

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.