mirror of https://github.com/adamdruppe/arsd.git
help transition form deprecated events a bit more
This commit is contained in:
parent
bf069468b3
commit
04b0710db7
|
@ -2852,6 +2852,7 @@ struct RealTimeConsoleInput {
|
||||||
struct KeyboardEvent {
|
struct KeyboardEvent {
|
||||||
bool pressed; ///
|
bool pressed; ///
|
||||||
dchar which; ///
|
dchar which; ///
|
||||||
|
alias key = which; /// I often use this when porting old to new so i took it
|
||||||
uint modifierState; ///
|
uint modifierState; ///
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -3061,6 +3062,11 @@ struct InputEvent {
|
||||||
CustomEvent /// .
|
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; }
|
@property Type type() { return t; }
|
||||||
|
|
||||||
|
@ -3817,6 +3823,8 @@ class LineGetter {
|
||||||
string editor = environment.get("EDITOR", "vi");
|
string editor = environment.get("EDITOR", "vi");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME the spawned process changes terminal state!
|
||||||
|
|
||||||
spawnProcess([editor, tmpName]).wait;
|
spawnProcess([editor, tmpName]).wait;
|
||||||
import std.string;
|
import std.string;
|
||||||
return to!(dchar[])(cast(char[]) std.file.read(tmpName)).chomp;
|
return to!(dchar[])(cast(char[]) std.file.read(tmpName)).chomp;
|
||||||
|
|
Loading…
Reference in New Issue