(Sou novo no fórum então peço desculpas antecipadas, caso tenha feito algo de errado durante a postagem) Estou tentando fazer um menu que em que eu possa usar as setas para escolher em que opção quero entra do menu em pascal, já conseguir fazer com que funcione com as setas, entretanto ainda não descobri, como representar a tecla <Enter>. por exemplo tecla := readkey if tecla = 'H' then {Este H equivale a tecla para cima} begin {blá blá blá} end else if tecla = 'P' then {Já o P equivale a tecla para baixo} begin {blá blá blá} end {mas que expressão ou caractere equivale ao <enter>?} if tecla = <enter> then Vi em um forúm o cara falando que era '#13', mas aqui não funcionou mesmo apos usar uma string [3]. Então será que alguém pode me ajudar? desde já agradeço a ajuda de todos... Bem estou na dúvida se fui suficientemente claro então vou postar meu código: program menu; uses crt; var loop_menu : boolean; cont : byte; tecla : string [3]; cont_loop : integer; begin loop_menu := true; cont := 1; clrscr; writeln; writeln (' Sub-menu livros'); writeln; writeln (' Sub-menu alunos'); writeln; writeln (' Sub-menu emprestimos'); writeln; writeln (' Sair do sistema'); writeln; cont_loop := 1; while loop_menu = true do begin if cont = 1 then begin gotoxy (9,1); write ('|_______________________|'); gotoxy (9,3); write ('|_______________________|'); end else if cont = 2 then begin gotoxy (9,3); write ('|_______________________|'); gotoxy (9,5); write ('|_______________________|'); end else if cont= 3 then begin gotoxy (9,5); write ('|_______________________|'); gotoxy (9,7); write ('|_______________________|'); end else if cont = 4 then begin gotoxy (9,7); write ('|_______________________|'); gotoxy (9,9); write ('|_______________________|'); end; tecla := readkey; if tecla = 'H' then begin if cont = 1 then begin cont := cont + 3; gotoxy (9,1); write (' '); gotoxy (9,3); write (' '); end else if cont = 4 then begin cont := cont - 1; gotoxy (9,7); write (' '); gotoxy (9,9); write (' '); end else if cont = 3 then begin cont := cont - 1; gotoxy (9,5); write (' '); gotoxy (9,7); write (' '); end else if cont = 2 then begin cont := cont - 1; gotoxy (9,3); write (' '); gotoxy (9,5); write (' '); end end else if tecla = 'P' then begin if cont = 1 then begin cont := cont + 1; gotoxy (9,1); write (' '); gotoxy (9,3); write (' '); end else if cont = 2 then begin cont := cont + 1; gotoxy (9,3); write (' '); gotoxy (9,5); write (' '); end else if cont = 3 then begin cont := cont + 1; gotoxy (9,5); write (' '); gotoxy (9,7); write (' '); end else if cont = 4 then begin cont := cont - 3; gotoxy (9,7); write (' '); gotoxy (9,9); write (' '); end end else if tecla = '#13' then begin gotoxy (19,19); writeln ('Funcionou'); readln; end else if tecla = '1' then begin gotoxy (19,9); writeln ('Funcionou'); readln; end; end; end.