mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-14 06:31:31 +00:00
treat keyboard input special and log it
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/ptyview_with_pipes@39555 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d1a269c0cb
commit
e082b8e3d7
1 changed files with 13 additions and 3 deletions
|
@ -279,6 +279,13 @@
|
|||
[stdinHandle synchronizeFile];
|
||||
}
|
||||
|
||||
/* for input as typed from the user, it needs to be shown too*/
|
||||
- (void) typeString: (NSString *)string
|
||||
{
|
||||
[self putString:string];
|
||||
[self logString:string newLine:NO];
|
||||
}
|
||||
|
||||
/**
|
||||
* Put a single character into the stream.
|
||||
*/
|
||||
|
@ -301,7 +308,10 @@
|
|||
NSString *chars;
|
||||
|
||||
chars = [theEvent characters];
|
||||
if ([chars length] == 1)
|
||||
if ([chars length] == 0)
|
||||
{
|
||||
}
|
||||
else if ([chars length] == 1)
|
||||
{
|
||||
unichar c;
|
||||
c = [chars characterAtIndex: 0];
|
||||
|
@ -314,11 +324,11 @@
|
|||
}
|
||||
if (c == 13) // CR
|
||||
{
|
||||
[self putString: @"\n"];
|
||||
[self typeString: @"\n"];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self putString: chars];
|
||||
[self typeString: chars];
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue