mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 16:09:25 +02:00
* Send escape code to xterm to make alt+key send an escape prefix.
git-svn-id: trunk@2777 -
This commit is contained in:
parent
5abe3dbe38
commit
d772104ce7
@ -1247,6 +1247,10 @@ begin
|
|||||||
{ default for Ctrl Prefix is ^W }
|
{ default for Ctrl Prefix is ^W }
|
||||||
if CtrlPrefix=0 then
|
if CtrlPrefix=0 then
|
||||||
CtrlPrefix:=23;
|
CtrlPrefix:=23;
|
||||||
|
if copy(fpgetenv('TERM'),1,4)='xterm' then
|
||||||
|
{The alt key should generate an escape prefix. Save the old setting
|
||||||
|
make make it send that escape prefix.}
|
||||||
|
write(#27'[?1036s'#27'[?1036h');
|
||||||
{$ifdef linux}
|
{$ifdef linux}
|
||||||
end;
|
end;
|
||||||
{$endif}
|
{$endif}
|
||||||
@ -1260,6 +1264,11 @@ begin
|
|||||||
{$ifdef linux}
|
{$ifdef linux}
|
||||||
unpatchkeyboard;
|
unpatchkeyboard;
|
||||||
{$endif linux}
|
{$endif linux}
|
||||||
|
|
||||||
|
if copy(fpgetenv('TERM'),1,4)='xterm' then
|
||||||
|
{Restore the old alt key behaviour.}
|
||||||
|
write(#27'[?1036r');
|
||||||
|
|
||||||
SetRawMode(false);
|
SetRawMode(false);
|
||||||
|
|
||||||
FreeTree;
|
FreeTree;
|
||||||
|
Loading…
Reference in New Issue
Block a user