1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Bash-like Esc->Backspace behavior

Discussion in 'Support' started by DVB, Oct 1, 2013.

  1. DVB

    DVB

    Joined:
    Jul 16, 2008
    Messages:
    2
    Likes Received:
    0
    Under bash, if I press Esc and then backspace, the behavior of backspace is such that it deletes the previous "word" (space-delimited) rather than the previous character. Is there currently a way to achieve this with Take Command?

    TCC 15.01.52 x64 Windows 7 [Version 6.1.7601]
     
    #1 DVB, Oct 1, 2013
    Last edited: Oct 1, 2013
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,287
    Likes Received:
    39
    It would be nontrivial. How about Control-L ?
     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,883
    Likes Received:
    29
    You might be able to use Modifier-BkSp (modifier = Shift/Alt/Ctrl) with a key mapping INI directive ... I didn't try it.

    Maybe,

    NormalKey=Ctrl-L
    DelWordLeft=Shift-BkSp
     
  4. DVB

    DVB

    Joined:
    Jul 16, 2008
    Messages:
    2
    Likes Received:
    0
    Ctrl-L works well. If I can indeed map that into Shift-BkSp, it would be a fairly easy to remember key combination.

    Thanks!
     
  5. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    Help topic "Key Names" enumerates what key combinations can be mapped to actions in TCC. No more than one of the prefixes Alt-, Ctrl- and Shift- can be used regardless of Windows delivering them or not to TCC. The BkSp key can be prefixed only with Alt- or with Ctrl-, but not with Shift-. You cannot use the Shift-BkSp combination for anything, but you can use Alt-BkSp or Ctrl-BkSp.

    Since you need to train your fingers to a different combination than what you are accustomed to, why not Ctrl-L, the default one?

    Of course, you are free to create a key handler plugin, which would intercept the ESC-BkSp sequence, and send ctrl-L to TCC instead... But this would interfere with the use of the ESC key during keyboard command entry: erase the whole line. You could, of course, detect the ESC key and wait a specified time before deciding how much to erase - the whole line, or just the word on left.

    The other point is the way key mapping works in TCC. Read Help topic "Key Mapping Directives". There are four separate key mappings; any key may be mapped to actions in each that are entirely unrelated. To make a key which is mapped to an action in one of the default mappings available for a different action, it needs to be unmapped first by the relevant normal key directive: NormalKey, NormalEditKey, NormalListKey, or NormalPopupKey. If you don't expect to use the defaullt key for some other purpose, nmapping it is unnecessary.
     

Share This Page