Update
This commit is contained in:
@@ -208,27 +208,30 @@ internal static class Program {
|
|||||||
Process.GetCurrentProcess().Kill();
|
Process.GetCurrentProcess().Kill();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long delLast = 0;
|
||||||
|
HotKeyManager.RegisterHotKey(Keys.Decimal, KeyModifiers.NoRepeat);
|
||||||
// Register main number keys (0-9)
|
// Register main number keys (0-9)
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++)
|
||||||
HotKeyManager.RegisterHotKey(Keys.D0 + i, KeyModifiers.Alt);
|
HotKeyManager.RegisterHotKey(Keys.D0 + i, KeyModifiers.Alt);
|
||||||
HotKeyManager.RegisterHotKey(Keys.D0 + i, KeyModifiers.Alt | KeyModifiers.Shift);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Register numpad keys (1-9)
|
// Register numpad keys (1-9)
|
||||||
for (int i = 0; i < 9; i++) {
|
for (int i = 0; i < 9; i++)
|
||||||
HotKeyManager.RegisterHotKey(Keys.NumPad1 + i, KeyModifiers.Alt);
|
HotKeyManager.RegisterHotKey(Keys.NumPad1 + i, KeyModifiers.Alt);
|
||||||
HotKeyManager.RegisterHotKey(Keys.NumPad1 + i, KeyModifiers.Alt | KeyModifiers.Shift);
|
|
||||||
}
|
|
||||||
|
|
||||||
HotKeyManager.RegisterHotKey(Keys.Oemtilde, KeyModifiers.Alt);
|
HotKeyManager.RegisterHotKey(Keys.Oemtilde, KeyModifiers.Alt);
|
||||||
HotKeyManager.HotKeyPressed += HotKeyManager_HotKeyPressed;
|
HotKeyManager.HotKeyPressed += HotKeyManager_HotKeyPressed;
|
||||||
|
|
||||||
static void HotKeyManager_HotKeyPressed(object sender, HotKeyEventArgs e) {
|
void HotKeyManager_HotKeyPressed(object sender, HotKeyEventArgs e) {
|
||||||
if (e.Key == Keys.Oemtilde && e.Modifiers == KeyModifiers.Alt) {
|
if (e.Key == Keys.Oemtilde && e.Modifiers == KeyModifiers.Alt) {
|
||||||
TrackWows();
|
TrackWows();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long now = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
|
||||||
|
if (e.Key == Keys.Decimal)
|
||||||
|
delLast = now;
|
||||||
|
|
||||||
int index;
|
int index;
|
||||||
if (e.Key >= Keys.D0 && e.Key <= Keys.D9) {
|
if (e.Key >= Keys.D0 && e.Key <= Keys.D9) {
|
||||||
index = e.Key - Keys.D0;
|
index = e.Key - Keys.D0;
|
||||||
@@ -240,11 +243,15 @@ internal static class Program {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long cocksucker = DateTime.Now.Second;
|
||||||
|
Console.WriteLine(cocksucker);
|
||||||
if (e.Modifiers == KeyModifiers.Alt) {
|
if (e.Modifiers == KeyModifiers.Alt) {
|
||||||
TabTo(index);
|
if (now - delLast <= 1) {
|
||||||
}
|
Swap(index);
|
||||||
else if (e.Modifiers == (KeyModifiers.Alt | KeyModifiers.Shift)) {
|
delLast = 0;
|
||||||
Swap(index);
|
} else {
|
||||||
|
TabTo(index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user