P
P
Programist189462022-04-09 00:52:40
Pascal
Programist18946, 2022-04-09 00:52:40

How to make the program write small letters when you click on the small letters of the keyboard?

Hello, I am writing a program in Pascal,

uses GraphABC;
procedure WriteText(Key:Integer);
begin
  case key of 48..57, 65..90, 97..122:
 begin
     writeln(key + ' ' +chr(key));
  end;
  end;
end; 

begin
OnKeyDown:=writetext;
end.

but when you press small letters on the keyboard, it still gives out big letters please help

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Bannikov, 2022-04-09
@vabka

The keyboard has no such thing as "small letters" - only pressed buttons
. So you need to do it yourself at this point:
writeln(key + ' ' +chr(key));
Write letters in lower case.

H
HemulGM, 2022-04-09
@HemulGM

LowerCase(chr(key));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question