New Articles
Windows 11 users have discovered a funny bug that benefits older computers....
It's easy to turn off the transmission — we tell you how to do it....
Such photos have been taken by models and social media users for a long time,...
A famous musician? A schoolteacher? Mom? Tell us about the people you looked up...
Thanks to the instructions of Artyom Kozoriz, you can cope no worse than a...
5 interesting exercises that will help you develop flexibility....
From "Starship Troopers" and "The Matrix" to...
The return of Garfield and Mufasa, the new Transformers and the Lord of the...
Trickben.com » DIY » Turn the numeric keypad into a remote control

Turn the numeric keypad into a remote control

03 May 2023, 18:40, parser
0 comments    0 Show

I know that the use of certain capabilities of any technique depends almost exclusively on the tasks that are set and the personal preferences of a person. I myself really like «hotkeys » and on occasion I try to use them one hundred percent. However, I have always been confused by the need to add modifiers (Ctrl, Alt, Shift) to the keys themselves, because function keys are used in applications every now and then, as IBM design guides have historically bequeathed to us. But using Ctrl +F* seems unnatural to me: every time you have to arrange a mini-crucifixion, which tires your fingers beyond measure. But I found a way to solve this problem for myself.


Thinking about which keys I use less often than others, I realized that this is a numeric keypad. Traditionally, I am used to performing computing tasks using the main set of keys, apparently due to the fact that I once wrote code. The first step is done: the keys are found, it remains to turn them into a powerful assistant.

To do this, I wrote small handlers for Autohotkey, which are designed to perform simple functions in general:

  • Make sure that the program associated with this key is running, and if not, run it;
  • Activate this program;
  • Minimize all other windows in some cases.

Why would I want to minimize the other windows? Simply because it allows you to concentrate on the task at hand, allowing you to switch TV channels in reality. Agree, you could not be distracted by TNT if you only see the channel «Culture».

The field tests were successful, although the scripts themselves can probably be done better if you succeed — share with me and all readers in the comments. I'm even seriously thinking about printing or ordering stickers on the keys depicting the icons of the applications I use most often. In addition, you can turn a specific set of handlers into a single executable file to share with others, for example.

Here is an example of a script suitable for Gmail running in Chrome:

SwitchTo(){

WinMinimizeAll

WinActivate

WinRestore A

return

}

Numpad1::

IfWinExist, Gmail

SwitchTo()

else

Run «C:Documents and SettingsAleexeyLocal SettingsApplication DataGoogleChromeApplicationchrome.exe»  —app=https://mail.google.com/mail

return

I think you've caught the idea: you need to check whether the program is running (this can be done by the title or class of the window) and, depending on this, either restart it or switch to it by minimizing the other windows. Let your imagination run wild.

Read also:
03 May 2023, 05:17    4    0
Read the continuation of this publication — 6 free or budget alternatives to Microsoft Office Web...
Comments
reload, if the code cannot be seen