Let's talk about Scriptable Hotkeys

Features wanted...
Post Reply
admin
Site Admin
Posts: 66258
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Let's talk about Scriptable Hotkeys

Post by admin »

Scriptable hotkeys? ... here are some examples (3 of about 12 (and rising)) directly from the code. Should give you an idea...

Code: Select all

  defFunctionSH eF_SH_GoTo, "Go To [...]", _
      "Go to specified location"

  defFunctionSH eF_SH_Open, "Open [...]", _
      "Open specified item."

  defFunctionSH eF_SH_OpenWith, "Open With [...]", _
      "Open selected item(s) with specified application."
The [...] is the user-configurable part (plus the key combo to trigger it, of course). Maybe "scriptable" is not the best term for it, since it's basically a command with a variable that can be set by the user, like a switch.

The CKS dialog will get an additional input field.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Post by serendipity »

Wow!! Sounds awesome. hmmm very interesting. [think mode].

admin
Site Admin
Posts: 66258
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

Just to make sure: of course, you can have any number of instances of any script key type, meaning: 5 different GoTo keys, 12 OpenWith keys etc.

admin
Site Admin
Posts: 66258
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

FYI, here are the others I compiled so far.

Code: Select all

  defFunctionSH eF_SH_Copy, "Copy [...]", _
      "Copy specified item to clipboard."
  defFunctionSH eF_SH_MoveTo, "Move To [...]", _
      "Move selected item(s) to specified location"
  defFunctionSH eF_SH_CopyTo, "Copy To [...]", _
      "Copy selected item(s) to specified location"
  defFunctionSH eF_SH_CopyHere, "Copy [...] Here", _
      "Copy the specified item to the current folder."
  defFunctionSH eF_SH_CreateNewFolder, "Create New Folder [...]", _
      "Create a new folder named as specified in the current folder."
  defFunctionSH eF_SH_BackupTo, "Backup To [...]", _
      "Backup selected item(s) to specified location"
  defFunctionSH eF_SH_RenameBatch, "Batch Rename [...]", _
      "Rename selected item(s) based on specified template"
  defFunctionSH eF_SH_RenameRegExp, "RegExp Rename [...]", _
      "Rename selected item(s) based on specified Regular Expression"
  defFunctionSH eF_SH_SelectTab, "Select Tab [...]", _
      "Select tab at specified position. Enter '1' for left-most tab, '2' for the next, etc."      
  defFunctionSH eF_SH_Shell, "Shell [...]", _
      "Run specified Shell command"

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

admin wrote:Just to make sure: of course, you can have any number of instances of any script key type, meaning: 5 different GoTo keys, 12 OpenWith keys etc.
hmm.. will it be possible to have more than one function/command assigned to one key ?

For example, having one "key" to do this: (RS=Rename Special, I2C=Info to Clipboard)
1/ RS: UrlUnescape
2/ RS: _ to Spaces
3/ RS: RegExp Rename [regexp here]
4/ I2C: Item Names

..would be pretty cool! :D
Proud XYplorer Fanatic

John Bee
Posts: 323
Joined: 01 May 2005 20:21
Location: Win10, Win11 @100%

Post by John Bee »

jacky wrote:hmm.. will it be possible to have more than one function/command assigned to one key ?

For example, having one "key" to do this: (RS=Rename Special, I2C=Info to Clipboard)
1/ RS: UrlUnescape
2/ RS: _ to Spaces
3/ RS: RegExp Rename [regexp here]
4/ I2C: Item Names

..would be pretty cool! :D
Oh Ya. This would surely bring XY to the next level of Nirvana! :)

admin
Site Admin
Posts: 66258
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

jacky wrote:For example, having one "key" to do this: (RS=Rename Special, I2C=Info to Clipboard)
1/ RS: UrlUnescape
2/ RS: _ to Spaces
3/ RS: RegExp Rename [regexp here]
4/ I2C: Item Names

..would be pretty cool! :D
Already on the roadmap and called "scriptability". :) Those scripts will be stored in the catalog, and then you can assign a KS to the catalog item.

Okay, it will all be the same "scripting language" (which is 90% done in my head), so I could indeed add it right away to the hotkeys. But I rather have one simple thing with a simple interface first, and a more advanced thing later and in another place.
You know, with real free scripting there the problem of syntax errors... lots of checks and validations. However with my "scriptable hotkeys" (a better term is always welcome!) there's no way for the user to do anything wrong. Foolproof, intuitive, quick. :)

admin
Site Admin
Posts: 66258
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

admin wrote:... However with my "scriptable hotkeys" (a better term is always welcome!) there's no way for the user to do anything wrong. Foolproof, intuitive, quick. :)
I'll try to get this done before vacation. Need a better term since "scriptable" is just too much for it. All you can do is fill one blank slot with a certain type of information, e.g. fill a path into "Go To [...]".

What about softkeys !? That would sum up what it is: user-adjustable (=soft) commands that can have keyboard shortcuts.

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

admin wrote:What about softkeys !? That would sum up what it is: user-adjustable (=soft) commands that can have keyboard shortcuts.
I don't know.. doesn't sound quite obvious to me, but that might be me.

Question: will all those "new" commands be added into a new category on CKS interface, eg. a new one after Misc. ?
If so, why not forget about the "key" part and focus about the "customizable" part of the commands. So more along the lines of "customizable commands"... ?

I think that would make sense, and be more "obvious" as what it is/does.
Plus, such names would also make perfect sense the for other use in the future, like the customizable toolbar buttons ;)
Proud XYplorer Fanatic

admin
Site Admin
Posts: 66258
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

jacky wrote:
admin wrote:What about softkeys !? That would sum up what it is: user-adjustable (=soft) commands that can have keyboard shortcuts.
I don't know.. doesn't sound quite obvious to me, but that might be me.

Question: will all those "new" commands be added into a new category on CKS interface, eg. a new one after Misc. ?
If so, why not forget about the "key" part and focus about the "customizable" part of the commands. So more along the lines of "customizable commands"... ?

I think that would make sense, and be more "obvious" as what it is/does.
Plus, such names would also make perfect sense the for other use in the future, like the customizable toolbar buttons ;)
"customizable commands"... yes, only that they are a bit hard to trigger without a key -- that's why I wanted the "key" in it. Also they will be stored in ks.dat. From the technical point of view they are key combos with a variable parameter.
But OTOH: we have that new "Close & Trigger" thing, and I'm thinking about adding a new menu (!) in the main window which will make the "customizable commands" reachable via mouse.
"customizable commands" is a bit long, especially for a menu name. What about "Custom commands" or "User commands" and then simply "User" as the menu name (would be located between "Tools" and "Window" I think).

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

admin wrote:"customizable commands"... yes, only that they are a bit hard to trigger without a key -- that's why I wanted the "key" in it.
Yeah... for now ;)
admin wrote:But OTOH: we have that new "Close & Trigger" thing, and I'm thinking about adding a new menu (!) in the main window which will make the "customizable commands" reachable via mouse.
"customizable commands" is a bit long, especially for a menu name. What about "Custom commands" or "User commands" and then simply "User" as the menu name (would be located between "Tools" and "Window" I think).
hmm... only those commands, not the Misc ones too? You could even have under "Tools" itself, (or a new menu "Extras"), two submenus:
- Miscellaneous commands
- Custom commands
Proud XYplorer Fanatic

admin
Site Admin
Posts: 66258
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

jacky wrote: You could even have under "Tools" itself, (or a new menu "Extras"), two submenus:
- Miscellaneous commands
- Custom commands
Now you're talking! :D

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Post by j_c_hallgren »

If I followed this discussion correctly, I think I agree with new Extra menu, as it appears there may be some new commonds that aren't easily "mouseable", and while I like/use some CKS, there are others that I only use occasionally so having them available via mouse is definitely needed! (Since I'd likley have forgotten what obscure key combo I'd used :roll: )
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

Post Reply