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

  • Home
  • SEARCH
  • 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 8829147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:46:08+00:00 2026-06-14T07:46:08+00:00

I have this program in C that reads the input like this: cod1 =

  • 0

I have this program in C that reads the input like this:

cod1 = getch ();
  if (kbhit())
    cod2 = getch ();

I can read every Ctrl+Char possible sequences, except for Ctrl+C, that closes the program – that is OK, and Ctrl+S, that simple is not catch. But I wanted to make Ctrl+S to be the save function in my program; how could I do that? Furthermore, is it possible to read Alt+Char characters? Because it reads it as a regular character, e.g., Alt+A is read with the same codes as A.

  • 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-06-14T07:46:10+00:00Added an answer on June 14, 2026 at 7:46 am

    Your problem is that input probably gets eaten by terminal emulator.

    For example Alt+<Whatever> is often reserved for menu shortcuts (e.g. Alt+F opens File menu). Matching characters are often hilighted once you hold Alt (F get’s underscored in File).

    Ctrl+S is reserved for Stops all output on screen (XOFF) (again your terminal emulator does that).

    As for using Alt+<...> as shortcuts in your command line application. As far as I’m concerned holding Alt doesn’t affect character received, it just sets flags which are hard to access in console. Even in GUI application (in Windows) it’s quite tricky and you have to use function like GetAsyncState() to check whether alt was pressed.

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

Sidebar

Related Questions

I have a Perl question like this: Write a Perl program that will read
I have a program that looks something like this: public partial class It {
I have a program that looks like this. I need to consistently write something
I have a program that simulates mouse click. Code is something like this: [DllImport(user32.dll,
This is a homework assignment, I have to write a program that reads a
I would like to have a program that makes the following actions: Read several
I'd like to know if there exists a program that can read DTD specifications,
I have this program that should execute a piece of code base on the
I have this program that I am working on for class, I think the
I have this simple program that computes salaries for four different worker types. It's

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.