Hotkeys plugin

Discuss and announce AkelPad plugins
Post Reply
  • Author
  • Message
Offline
Posts: 2247
Joined: Tue Aug 07, 2007 2:03 pm
Location: Vinnitsa, Ukraine

Post by FeyFre »

Instructor
I also wanted to say that, but changed mind. It will work if and only if NumLock will be turned off when he uses Hotkey. Many of people prefer to turn it on.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

Instructor wrote:It will work if you turn off NumLock.
Can you do, so that it worked regardless of the NumLock key status.

Offline
Posts: 2247
Joined: Tue Aug 07, 2007 2:03 pm
Location: Vinnitsa, Ukraine

Post by FeyFre »

KDJ
I think it is probably impossible. Because Alt+NumPad sequence will be catch by Windows to transform it into character(and shift can be used too). So even if Instructor teach AkelPad to catch them, such keystrokes will not reach akelpad anyway. The same rule for Alt+Ctrl+Delete salute.

Offline
Posts: 876
Joined: Tue Jul 24, 2007 8:54 am

Post by Fr0sT »

WM_KEY or something like that will do the job (at least I think so and I've seen constants like VK_NUMPAD1 in Delphi). But I'm not 100% sure until I check it tomorrow.

PS.
FeyFre
Зарегистрирован: 07.08.2007
Сообщения: 666
Mwa-ha-ha!

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

So, better not to use keyboard shortcuts such as Shift+Alt+Num0, Ctrl+Shift+Num0, Ctrl+Alt+Num0.

Offline
Posts: 876
Joined: Tue Jul 24, 2007 8:54 am

Post by Fr0sT »

I performed a little investigation with WM_KEYUP message.
It's really fired with Key = VK_NUMPAD0..VK_NUMPAD9 when pressing some key on the numpad but - only when NumLock is ON. When is's OFF, these keys are the same as Ins/Home/Left/Right etc. There's no way to distinguish one from another except by catching low-level keyboard input. I don't think someone wants to deal with it :)

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

Добавлено: F2 - редактирование имени.

Added: F2 - rename item.


Hotkeys plugin v3.7

J2K
Offline
Posts: 2
Joined: Sat Mar 12, 2011 4:24 pm

Post by J2K »

Всем добрый вечер. А вот подскажите мне, могу ли я при помощи данного плагина повесить на комбинацию Ctrl+] выполнение комбинации Shift+End. А то на ноуте вообще пальцы не гнутся под Shift+End, Shift+Home и т.д.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

J2K
You can use the following script:

Code: Select all

// Call("Scripts::Main", 1, "ShiftEndHome.js", "0") - Shift+End
// Call("Scripts::Main", 1, "ShiftEndHome.js", "1") - Shift+Home

var VK_END = 0x23;
var hEditWnd = AkelPad.GetEditWnd();
var nAction;

if (WScript.Arguments.length)
{
  nAction = Number(WScript.Arguments(0));
  if (hEditWnd)
    AkelPad.SendMessage(hEditWnd, 3044 /*AEM_KEYDOWN*/, VK_END + nAction, 0x2 /*AEMOD_SHIFT*/);
}
Save the above code in the file ShiftEndHome.js.
Place this file in the directory: ...\AkelPad\AkelFiles\Plugs\Scripts.
Using Hotkeys plugin, you can asign keys:
Ctrl+] - to command Call("Scripts::Main", 1, "ShiftEndHome.js", "0"),
Ctrl+[ - to command Call("Scripts::Main", 1, "ShiftEndHome.js", "1").

J2K
Offline
Posts: 2
Joined: Sat Mar 12, 2011 4:24 pm

Post by J2K »

KDJ
Thanks! It has worked!
:D

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

I have a request for Instructor.
Can you add in dialog plugin, keyboard shortcuts to the buttons: "Modify", "Up", "Down", "Delete", "All keys"?
To sort the keys, I had to click the mouse a few thousand times.
Using the keyboard would be easier.

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

KDJ
Added.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

Thanks Instructor.
I understand that will be available in the next version of AkelPad.

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

Добавлено: меню и горячие клавиши для списка.
Добавлено: внешний вызов с кодом 10 - запуск/остановка плагина без диалога.

Added: menu and hot keys for the list.
Added: external call with code 10 - Start/stop plugin without dialog.


Hotkeys plugin v4.1

Offline
Posts: 366
Joined: Mon Jan 10, 2011 5:28 pm
Contact:

Post by Lenchik »

Хочется ещё один параметр - \с - для вставки содержимого буфера обмена.
А то когда приходится много одинаковых ссылок вставлять для разного текста, часто приходится править в плагине назначение на клавиу вида

Code: Select all

Insert("<a href=\[0022]#link\[0022]>\s</a>",1)
Вот если бы вместо #link вписать \c, чтобы подхватывался буфер, то тогда в одно месте закинул в буфер адрес, потом выделил нужный текст и нажал запрограммированный хоткей, потом в другом месте другой адрес и т. д.
Post Reply