Update
This commit is contained in:
@@ -208,27 +208,30 @@ internal static class Program {
|
||||
Process.GetCurrentProcess().Kill();
|
||||
}
|
||||
|
||||
long delLast = 0;
|
||||
HotKeyManager.RegisterHotKey(Keys.Decimal, KeyModifiers.NoRepeat);
|
||||
// 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 | KeyModifiers.Shift);
|
||||
}
|
||||
|
||||
// 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 | KeyModifiers.Shift);
|
||||
}
|
||||
|
||||
|
||||
HotKeyManager.RegisterHotKey(Keys.Oemtilde, KeyModifiers.Alt);
|
||||
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) {
|
||||
TrackWows();
|
||||
return;
|
||||
}
|
||||
|
||||
long now = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
|
||||
if (e.Key == Keys.Decimal)
|
||||
delLast = now;
|
||||
|
||||
int index;
|
||||
if (e.Key >= Keys.D0 && e.Key <= Keys.D9) {
|
||||
index = e.Key - Keys.D0;
|
||||
@@ -240,11 +243,15 @@ internal static class Program {
|
||||
return;
|
||||
}
|
||||
|
||||
long cocksucker = DateTime.Now.Second;
|
||||
Console.WriteLine(cocksucker);
|
||||
if (e.Modifiers == KeyModifiers.Alt) {
|
||||
if (now - delLast <= 1) {
|
||||
Swap(index);
|
||||
delLast = 0;
|
||||
} else {
|
||||
TabTo(index);
|
||||
}
|
||||
else if (e.Modifiers == (KeyModifiers.Alt | KeyModifiers.Shift)) {
|
||||
Swap(index);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user