Quantcast
Channel: Total Commander
Viewing all articles
Browse latest Browse all 18755

Eng :: Question: new internal commands in 9 beta?

$
0
0
Author: sirksel
Subject: Question: new internal commands in 9 beta?
Posted: Sat Sep 03, 2016 10:53 am (GMT -6)

I've noticed a lot of new internal commands available in TC9. Thanks, Mr. Ghisler! I may be missing something, but I'm trying to find a few that correspond to basic navigation, such as:

GotoNextItem ---- like pressing Down (arrow) in the file list
GotoPrevItem ---- like pressing Up (arrow) in the file list
GotoNextPage ---- like pressing PgDn in the file list
GotoPrevPage ---- like pressing PgUp in the file list

Does anyone know if I'm missing any commands like this that already exist (or any reasonable TC-only substitutes)? Here are a couple of potential use cases:

1. Go to next directory at same level as the one you are in. Right now, I use an AHK keystroke to send TC a {backspace}{down}{enter}, and that works OK, until the next item is a file, and then it gets launched. I notice we now have discrete internal commands to accomplish almost all of this using command chaining. For example, we could do:
Code:
[em_GotoNextSiblingDir]
cmd=cm_GoToParent, cm_GotoNextItem, cm_GoToDir

(...if I could find cm_GotoNextItem...) This would have the benefit of failing at the parent level when you are out of directories to traverse, rather than launching the file below those directories (as the AHK solution does). I know, I could make AHK test the file under the cursor to see if it's a directory, but it's so much simpler and more elegant to keep it in a command chain in TC rather than sending keys. Does anyone know if there's a TC-only solution that would accomplish the same goal for a keystroke?

2. Redefine some home-row navigation. As I was remapping keystrokes for TC9, I thought it might be cool to try some home-row j/k style navigation of the file list (or, in my case, Alt+J/K). This is not to replace the arrows, but to augment them, for those times when you don't want to lift your hands from home row. Anyhow, it would be easily accomplished with:
Code:
[Shortcuts]
A+J=cm_GotoNextItem
A+K=cm_GotoPrevItem

...except as far as I can tell, those internal commands don't exist. Do they? Right now, I'm also doing this using by remapping keys in AHK. However, as with the case above, it's so much better to keep keystroke maps all in TC, and use the AHK scripts for more complicated things like processing batches of files.

Thanks for your help in taking a look at this. Please let me know if I've missed a good TC-only solution. Or if you think these commands would be easy to add and helpful, is it something that could be added easily?


Viewing all articles
Browse latest Browse all 18755

Trending Articles