TWinKey

TWinKey is a powerful TC extender designed to improve and simplify most common navigation tasks and enhance TC "look&feel" experience by adding a variety of custom coloring capabilities. It comes with a great configuration utility (TWinKey Utilisator) that allows fast and easy modification of all TWinKey parameters. It is recommended to place button for starting TWinKey Utilisator on TC buttonbar. 

Requirements

TWinKey 3.111 (or later) requires at least TC 8.0 (backward compatibility with TC 7.5 is not fully tested)

Disclaimer

THIS SOFTWARE AND THE ACCOMPANYING FILES ARE DISTRIBUTED "AS IS" AND WITHOUT ANY WARRANTIES WHETHER EXPRESSED OR IMPLIED. NO RESPONSIBILITIES FOR POSSIBLE DAMAGES OR EVEN FUNCTIONALITY CAN BE TAKEN. THE USER MUST ASSUME THE ENTIRE RISK OF USING THIS SOFTWARE.

In other words:

"We decline responsibilities, all shapes, all sizes, all colors." © J. Brunner

Main features

Navigation

 Look&feel
 Miscellaneous 

Installation

TWinKey has to be installed as content plugin. By default it will be loaded by the first explicit request. There is an option to enforce automatic loading on TC startup by creating custom coloring schema which is TWinKey dependent.

To do this follow the procedure below

The newly created coloring will not affect any existing coloring schemes but will cause TC to load the TWinKey automatically when TC starts.

All TWinKey settings are stored in the TWinKey.ini file. Although this file may be modified manually it is highly recommended to use the TWinKey Utilisator program instead.

All files(TWinKey.wdx, TWinKey.ini and TwinkUtil.exe) must be in the same directory.

Enhanced keyboard mapping

Allows to define hotkeys using Win key modifier in addition to Alt/Shift/Ctrl. It is possible to distinguish between left and right set of modifier keys and define any hotkey using left/right set of modifier keys only.

You can see not only user-defined assignments but also standard TC shortcuts. Standard shortcuts are taken from the file tc_default_hotkeys.hky. This file belongs to Ultra TC Editors package and is included in the distribution with the kind permission of the author of the package, Taher Salem.

TC or TWinkey commands, which is not assigned to the keys, keep the default Windows color for the text (most often – black).

In other cases, the color of the lines mean the following: 

Duplicates button opens a window containing duplicated assignments for hotkeys. Double click on command name to scroll the command list to this assignment.

NOTE: If you want to redefine system level hotkeys (i.e. Ctrl+Escape or Win+M) you need to turn on "Enable system hotkeys redefinition" option on "Miscellaneous" page. 

DOS/UNIX-style autocompletion

Cycle through acceptable file/folder names while typing text. There are two differences from autocompletion used by TC:

Calculator

Calculator is a 2nd level plugin. It is simple single-line programmer calculator allowing to evaluate symbolic expressions.

Accepts single expressions in any edit box (i.e. TC command line). In addition to usual arithmetic operation supports exponentiation operator (^^), percentage operator (%%), modulo (%), C-style bit shifts(<<,>>), logical and bitwise AND, OR operators (&&,&,||,|) and XOR operator(^). Output could be formatted using decimal, hexadecimal or binary notation. Evaluation result could be stored in user-defined variables and used in further evaluations.

Calculator supports:
elementary function:
    sin, cos, tan, asin, acos, atan, atan2, sinh, cosh, tanh, asinh, acosh, atanh, log2, log10(log), ln, exp, sqrt, sign, abs;
round to integer function:
    rint;
C-like conditional expressions:
    <condition> ? <expression1> : <expression2>;

functions with variable number of arguments:
    sum, avg, min, max;
predefined constants:
    _pi=3.141592653589793238462643
    _e=2.718281828459045235360287

User can define unlimited number of constants and up to 100 functions and operators in muCalc.ini files. Operator can be assigned to previously defined function only. For functions with two parameter can be defined binary operator (section [Operators2]), for functions with single parameter can be assigned unary postfix operator (section [Operators1]).

User defined binary operator have precedence equal to exponent operator (higher than multiplication)

User defined binary operators have left assosiativity.

NOTE:Don't try to override built-in binary operators and constants due to unpredictable result.

Favorites & Templates

This is 2nd level plugin intended to usage in copy/move/unpack and other dialogs as well as many editable fields . TCFavorites command allows insert into editable field entry from TC Directory menu (directories only). Templates command shows user-defined menu stored in TCDirMenu.ini file. You can define different menu template for different context (dialogs/fields). Each menu is stored in separate section. Available sections for context menus are:
[CopyMoveMenu] – Copy/Move dialogs
[PackMenu] – Pack/Unpack dialogs
[NewDirFileMenu] – Dialogues for creation a new folder or file
[RenameMenu] – Inplace rename fields in the panel or in the panel header
[CmdLineMenu] – command line
[CommentMenu] – Comment edit dialog
[ToolbarMenu] – Dialogues for editing toolbars, user-defined commands, Hotlist menu and menu "Start".
You can reassign context menu to another menu/section by placing the entry "UseMenu=<menuname>" into corresponding section.

Example:
[NewDirFileMenu]
UseMenu=CopyMoveMenu


This is the list of functions avalable for templates:

$edt(formats) – Insert date/time according to English locale

$udt(format) – Insert date/time according to user locale.

$env(name) – Insert environment variable

$cnt – insert counter. Counter increment after every usage.

$dir – Current TC directory (last directory only)

$path – Insert Current TC directory (whole path without drive letter)

$sep – Insert menu separator

$sub(name) – Insert section <name> as submenu.

$sec(name) – Insert section <name> from wincmd.ini file. Allowed section names are: DirMenu, RightHistory, LeftHistory, Alias, Searches, FileSystemMenu, Rename, SyncOptions or any numbered section (i.e. ListerPlugins etc)

$clip(fileall|file|srcpath|trgpath) – Insert via clipboard text generated by TC internal commands:

$src – Insert source line text

$sel – Insert selected text from source line

$dbrowse(prompt) – Show standard Browse for Folder dialog and insert full path of the selected folder. Prompt is an optional parameter.

$fbrowse(filespec) – Show File Open dialog and insert full path of the selected file. Filespec is a mandatory parameter. It consists from pairs of description/wildcards separated by "|" sign.

$swat(section,show,insert,filter,group,ini-file) – Insert any section from any ini.file. All parameters except section are optional.

1 – Entry key or regexp group from the filter (default)

2 – Entry value

3 – Both key and value

0 – Nothing. This value can be useful to create helper/reference lists.

1 – Entry key or regexp group from the filter

2 – Entry value (default)

Examples:

$dbrowse(Choose backup folder)

$fbrowse(Graphics|*.bmp;*.jpg;*.png|All Files|*.*)

$swat(connections,3,2,\d+,0,%Commander_path%\wcx_ftp.ini) displays a list of saved ftp connections.

$swat(Searches,1,1,(.+)_SearchFor,1) displays the same list as $sec(Searches).

$swat(BookMarks,2,2,\d+,0,%Commander_path%\Plugins\wdx\twinkey\TWinKey.bkm) displays a list of bookmarked files.

 

The formatting codes for date and time are taken from strftime function. For full list of codes look at MSDN.

Set/ResetCounter command sets counter to specific value or resets counter to zero. If the current line starts with a number or the current selection starts with a number, this number will be the new value of the counter. If neither line nor the selection does not begin with a number, then the counter is reset.

Stopwatch timer

Stopwatch timer is a 2nd level plugin. Displays small timer window attached to the right bottom corner of TC window. Supports Start/Stop, Pause/Resume and Show/Hide commands. Timer is activated by Start/Stop command, Timer is closed by double click with right mouse button, by Show/Hide command or when user changes the view in right TC panel.

Auto switch "view mode" on change directory

Auto switching feature enables to change automatically the following visual aspect of TC on change directory in TC file list panel

Set of these properties is called "Visual mode" and for each visual mode you should create a filter to determine the directory name it will automatically be applied. Each filter is a combination of patterns – wildcards, separated by a vertical line. 

Patterns are:

Patterns CAN are combined by logical OR; other patterns are combined by logical AND. Each filter must include at least one CAN pattern.

You can rename (double-click or F2 key), and activate/deactivate visual mode.

Example: Filter "?*Downloads*|?*DWL*|!*Music*" will match to all folders containing either "Downloads" or "DWL" but containing "Music" also.

NOTE: Tab icons are incompatible with TC option "All tabs have same width".

Enhanced drive list

Replaces TC combo box drive list. The enhanced drive list shows free/total space on fixed and removable disk and allows to arrange drives alphabetically or by category (fixed, removable, network, special folders) and alphabetically. 

You can add user-defined TC command as custom items to the drive list. In order to do this You have to create user commands with names like em_twdl_<Item_Name>.  All such commands will be added to the end of drive list. It is convenient for FTPOPEN commands or running tools to mount additional drives (Daemon Tools,TrueCrypt etc).

You can disable using of drives icons or use custom icon library (twdl.icl) with your favorites icons for different drive/media types. This library should be located in the same directory as TWinKey.wdx and must contain icons for the following media types: HDD, Removable Drive, CD_ROM, RAM Drive, Network Drive, Floppy,  FTP, Network & FS-Plugins

NOTE: Currently drag&drop is not supported and opens standard TC drive list.

Sticky files/folders

Allows to stick permanently chosen files/folders on the top of the file list independent of the current sort order. It is possible to specify explicit stick order by StickConfig command unless "Sort Sticked files" option is checked.

You can specify fixed (in pixels) or dynamic (in percents) alpha-gradient filling.

All commands for sticky files/folders management can be accessed from TWinKey main menu activated by middle-click on the path panel above filelist.

NOTE: Selecting too contrast colors relative to native TC background can affect readability of file names if ClearType technology is used.

Bookmarks

Allow to set bookmark for the files/folder and to navigate quickly between them. Command Save Bookmarks toggle saving bookmarks in the file so them will be available in the next TC session. Bookmarks menu is activated by hotkey assigned to  JumpBookMark command. It can be accessed also from TWinKey main menu activated by middle-click on the path panel above filelist.

Navigation could be sequential (next/previous) or direct jump via bookmarks menu. Bookmarks can be copied and pasted to/from clipboard via bookmarks menu. It is also possible to paste as bookmarks any text containing full qualified file names as well as file names from FSE plugin result list.

NOTE: Although it is possible to set bookmark on any file/folder it is strongly advise do not use bookmarks inside archives, FTP and virtual folders.

Order by group

Show First option allows to put groups of files to the top of the file list and Show Last option allows to put files at end of the file list. Group definition is a sequence of wildcards delimited by semicolon. Groups are separated by vertical line. By default, groups are sorted in the listed order, and the files within each group retain the current TC sort. If you put a sign ">" at the beginning of the definition, then the files within each group will sorted according to wildcard sequence also.

It is possible to use TC saved searches and predefined selections as wildcard. Name of TC's definition should be prefixed by "=" sign.

You can enable/disable grouping without erasing whole definition.

Grouping can be set globally (on "File Panels" page) or per folder basis.

Examples: 

1. String "*.zip:*.rar:*.7z|*.exe:*.dll:*.w?x" will put at top of the file list all archives followed by executables files.

2. String ">*.bmp:*.jpg:*.png" will put at top of the file list BMP files followed by JPG files followed by PNG files.

3. String "=Archives|=Executables" will put at top of the file list all archives followed by executables files according to saved TC's definitions.

NOTES: File grouping isn't applicable inside archives, FTP, FS-plugins and virtual folders. When file under the cursor is deleted, the cursor can jump on to the "really" following file and not on the next file in filelist.

Current item highlighting in inactive panel

Draws visual indication of the current file in the inactive panel or in both panels when the keyboard focus belongs to another window.

Close all Lister windows

Allows to close all lister windows in one shot. When option is enabled Close All menu item is added to the Lister's system menu. All Lister windows can be closed from system menu of any Lister window, from taskbar or by assigned hotkey.

Confirmation on closing Lister for multiple files

Ask user confirmation to close Lister window if this window was opened for view several files.

Auto scroll active tab caption

Useful when tab captions use single line only. If active tab caption is scrolled out of view it will be automatically scrolled back to view on panel re-activation.

Keep TC window in background on mouse click

Prevent TC from going to foreground on left mouse click. Very useful for drag&drop operations.

Next lister plugin in QuickView panel

Allows to assign hotkey for switching to the next plugin in QiuckView panel without setting focus first on QiuckView panel.

Colored Tabs

It is possible to assign tab color mark in View Mode or directly via Ctrl+RightClick on specific tab. If option "Save tab colors" is checked TWinKey  will  save tab colors on TC exit.

NOTE: Color mark is canceled when tab is dragged onto opposite panel.

Goto tab root directory by double click

Allows to switch to root directory of partially locked tab by double clicking on tab caption. This option overrides TC option "Close tab on double click".

Goto first/last entry in file list

Goto the first entry by middle mouse click on TC "Favorites" button. Goto the last entry by middle mouse click on TC "Directory hotlist" button.

Goto MyComputer folder from drive root folder

This option allows to go to MyComputer folder from drive root folder by Ctrl+PgUp and BackSpace without enabling [..] item in drive root.

Scroll tabs by mouse wheel

This options allows to scroll tabs by mouse wheel if tabs are located in the single row and aren't fit in the panel header.

Tab list navigation

This option allows to navigate to desired tab by using tab list menu. The tab list menu is displayed by right click on TC "Favorites" button.

Use desktop.ini for tab icons

Allows to show in tab caption icon from desktop.ini file assigned by Explorer for the current directory. Separate option defines priority of desktop.ini icons over visual mode icons. 

NOTE: Tab icons are incompatible with TC option "All tabs have same width".

This option is applicable for the directories accessed by drive letter only. It doesn't work for UNC names (\\Server\Share).

Single color for Brief view

This option allows to use single color background in Brief mode even if TC is set to two-color background.

Change column width in Brief view

This option allows to use Alt+middle mouse click to change width of column in Brief view. Corresponding option in TWinKey menu allows to temporarily enable/disable this feature during TC session.

Rectangular selection

This option allows to make rectangular retractable selection in file panels by middle mouse click. Selection state of files in the selected area is inverted. If selection was made using Ctrl+middle click all files in the selected area are added to selection.

Explorer-like inplace rename

This option allows to confirm inplace rename by mouse click outside of the rename field (like Explorer).

Enable system hotkeys redefinition

This option enable to use in TWinKey system hotkeys (i.e. Ctrl+Escape or Alt+Tab) defined in enhanced keyboard mapping. Explorer hotkeys like Win+M considered system hotkeys also.

Run command sequence

You can assign sequence of internal (cm_) and/or user-defined (em_) commands to be executed on TC startup. This option is useful for commands like cm_AdministerServer, cm_FtpHiddenFiles etc. You can add command to startup sequence by double click on command in TC command list. You can manually edit startup sequence on "Miscellaneous" page or disable it without erasing. It is possible also to define command sequence for View Mode. This command sequence will be executed on switching to this View Mode.

Clear or restore selection by ESC key

This option allows the use of repetitive pressing the ESC key to clear or restore selection if keyboard focus is on the file panel. It also removes the filter installed by Quick Search. In general rules are:

TWinCmd utility

TWinCmd is a program to send commands to TWinKey. TWinCmd should be started from TC environement only. You can start it from TC toolbar or from batch/script started from TC.

Usage: TWinCmd <command> | <plugin_name>,<function_number>

Plugin name is a name shown in Utilisator on Plugin page, not a plugin file name.  Function number is one of plugin functions shown in Utilisator on Plugin page.

Allowed commands are:


Acknowledgments

Calculator is based on the excellent fast math parser library – muParser.


Author: MGP Software Ltd.

Email:support@mgpsoft.com