I know this place is teeming with expert coders, so this should be a cinch for most of you.
I'm working in C('89) and all I want to do is make a program wherein I press a key and a specific (but different) character appears onscreen. For example, if I press the '1' key, I want 'b' to appear rather than '1'; if I press the '1' key twice, I want 'p' to appear (replacing the previous 'b', not following it). Some keys must summon as many as three characters in a row (e.g. pressing 'c' and getting 'ang'). I don't want the onscreen character to be set in stone until a new/different key is pressed (so if I press '1' '1' 's', for example, 'p' 'ai' would be displayed).
Is C the right language to be doing this in? My ultimate goal is an executable running in Terminal (or whatever). Basically the user types away, and stuff appears on screen.
Any help would be much appreciated!!
P.S. If anyone is curious about what this is for, here is a hint:
I'm working in C('89) and all I want to do is make a program wherein I press a key and a specific (but different) character appears onscreen. For example, if I press the '1' key, I want 'b' to appear rather than '1'; if I press the '1' key twice, I want 'p' to appear (replacing the previous 'b', not following it). Some keys must summon as many as three characters in a row (e.g. pressing 'c' and getting 'ang'). I don't want the onscreen character to be set in stone until a new/different key is pressed (so if I press '1' '1' 's', for example, 'p' 'ai' would be displayed).
Is C the right language to be doing this in? My ultimate goal is an executable running in Terminal (or whatever). Basically the user types away, and stuff appears on screen.
Any help would be much appreciated!!

P.S. If anyone is curious about what this is for, here is a hint:

Comment