help transition form deprecated events a bit more

This commit is contained in:
Adam D. Ruppe 2020-02-27 08:08:10 -05:00
parent bf069468b3
commit 04b0710db7
1 changed files with 8 additions and 0 deletions

View File

@ -2852,6 +2852,7 @@ struct RealTimeConsoleInput {
struct KeyboardEvent {
bool pressed; ///
dchar which; ///
alias key = which; /// I often use this when porting old to new so i took it
uint modifierState; ///
///
@ -3061,6 +3062,11 @@ struct InputEvent {
CustomEvent /// .
}
/// If this event is deprecated, you should filter it out in new programs
bool isDeprecated() {
return type == Type.CharacterEvent || type == Type.NonCharacterKeyEvent;
}
/// .
@property Type type() { return t; }
@ -3817,6 +3823,8 @@ class LineGetter {
string editor = environment.get("EDITOR", "vi");
}
// FIXME the spawned process changes terminal state!
spawnProcess([editor, tmpName]).wait;
import std.string;
return to!(dchar[])(cast(char[]) std.file.read(tmpName)).chomp;