Hello Alex!

I was wondering the same thing maybe about 10 years ago..
You can use the keyboard in graphic mode. But you can't use the "console" functionality provided by ReadLn/WriteLn; You can do the following: write a function to handle what will happen if the player presses some key. Also you make function to render your game objects to the screen. Then you cycle both functions until some event occur (like pressing Escape) that will exit the game cycle.

This is just brief pseudo code, i dont have Turbo Pascal to test it.
Code:
var 
  C: Char;
  GameRunning: Boolean;

Function HandleKeypress(Key: Char): Boolean;
Begin
  Case Key of
    #27: GameRunning := False; //Pressing Escape will cause the game cycle to break;
    'Z': ;//here you write code to handle what happen if the player presses "Z" button, 
    //etc
  End;

  Result := True; //Return error(success) code
End;

Function DrawGameScene: Boolean;
Begin
  //here you draw all your game objects using graph unit functions

  Result := True; 
End;

Begin
  InitGraph(...) //you initialize graphics here
  GameRunning:= True;

  Repeat
    DrawGameScene;
    
    If KeyPressed then Begin
      C := ReadKey;
      HandleKeyPress( C );
    End;
  Until GameRunning = False;
End.
I think the last Turbo Pascal is released in the mid 90-ties so it is about 20 years from now. And it can compile only for 16bit DOS (correct me if Im wrong).

But if your wish to use is Pascal, not concretely Turbo Pascal, you definitely have to make a search for FreePascal / Lazarus. And you have to learn another graphical library, because I doubt Graph will do the work for you. For example some 2d library based on OpenGL.