Are there keys that don't return ASCII codes?

  • Thread starter Thread starter JJBladester
  • Start date Start date
AI Thread Summary
The discussion revolves around the concept of keys that do not return ASCII codes, particularly focusing on control keys like the escape key. While the escape key does not produce a visible character on the screen, it is associated with a hex code (1B) and can be recognized by certain interrupts, suggesting it does return an ASCII code. Participants clarify the distinction between key codes, which identify the pressed key, and ASCII codes, which represent characters. Other modifier keys like CTRL, ALT, and Shift are also mentioned as not producing characters but serving specific functions. The conversation emphasizes understanding how different key codes and ASCII codes operate within computer systems.
JJBladester
Gold Member
Messages
281
Reaction score
2

Homework Statement



Give an example of a key that does not return an ASCII code.

The Attempt at a Solution



I looked at the extended ASCII table on www.ascii-code.com and found that there are several "control characters" which do not return a printable character. It seems pretty obvious that the escape key does not print a character, for example. However, it still returns code 1B (hex). I cannot imagine why there would be a key that would not return an ASCII code, and if so which key(s) that/they would be.
 
Physics news on Phys.org
JJBladester said:

Homework Statement



Give an example of a key that does not return an ASCII code.

The Attempt at a Solution



I looked at the extended ASCII table on www.ascii-code.com and found that there are several "control characters" which do not return a printable character. It seems pretty obvious that the escape key does not print a character, for example. However, it still returns code 1B (hex). I cannot imagine why there would be a key that would not return an ASCII code, and if so which key(s) that/they would be.

Think about the keys on your keyboard that modify the input or do something but don't actually produce characters on their own.
 
trollcast said:
Think about the keys on your keyboard that modify the input or do something but don't actually produce characters on their own.

I see where you are going with this (CTRL, ALT, Shift, etc.).

However, the escape key doesn't produce characters on the screen although it still has a hex code associated with it and it still can be read by certain interrupts like INT 16H. So, I am inclined to say it *does* return an ASCII code even though it is not displayed on the screen.
 
JJBladester said:
I see where you are going with this (CTRL, ALT, Shift, etc.).

However, the escape key doesn't produce characters on the screen although it still has a hex code associated with it and it still can be read by certain interrupts like INT 16H. So, I am inclined to say it *does* return an ASCII code even though it is not displayed on the screen.

The key / scan code is different to the ASCII code.

The key code tells the computer which key has been pressed, the os converts these into either values such as ascii codes or it will do something, eg. pressing the windows key will open the start menu, cap lock toggles the value the alphabet keys take, etc.

(The scan / key code tells which one of the keys on the keyboard has been pressed but not what it actually means so number 17 which is q on an english QWERTY keyboard would return a on a french AZERTY keyboard)
 
Thanks for clarifying about the scan codes vs. ASCII codes.
 
Thread 'Have I solved this structural engineering equation correctly?'
Hi all, I have a structural engineering book from 1979. I am trying to follow it as best as I can. I have come to a formula that calculates the rotations in radians at the rigid joint that requires an iterative procedure. This equation comes in the form of: $$ x_i = \frac {Q_ih_i + Q_{i+1}h_{i+1}}{4K} + \frac {C}{K}x_{i-1} + \frac {C}{K}x_{i+1} $$ Where: ## Q ## is the horizontal storey shear ## h ## is the storey height ## K = (6G_i + C_i + C_{i+1}) ## ## G = \frac {I_g}{h} ## ## C...
Back
Top