Skip to content

Cut / Paste defaults be changed #399

Closed

Description

@GoogleCodeExporter
My laptop does not have an insert key (ya' c'n delete but ya' c'n not insert). 
Any way of getting an option so that someone can create a new default key? (I 
like Ctl-C copy, Ctl-V paste).

Original issue reported on code.google.com by [email protected] on 14 Aug 2013 at 9:01

Activity

  1. nowox commented on Jun 30, 2015

    @nowox

    Unfortunately is used to abort the execution of a command SIGINT. However it would be interesting to implement a layer of key mapping customization depending on the current context.

    This could be implemented in the .minttyrc like this:

     key_mapping:
          <C-c>:
               process: vim, ed
               action: <S-Ins>
    
  2. mintty commented on Jun 30, 2015

    @mintty
    Owner

    Some remarks:

    • Interactive and especially screen-oriented applications typically grab those control keys, remapping them from SIGINT etc. And so does indeed vim, ^C does not abort vim. If it does not do something useful either, that's a problem of vim, not mintty. I guess it could be remapped in vim.
    • It is not a traditional function of a terminal to mangle control keys. It is rather generally expected that they deliver what they are meant to, to be able to "control" all kinds of programs with them, each in its respective way.
    • If we'd like to remap keys on an application-specific basis, the general problem arises that a terminal does not know which application is currently interacting with the screen as there can be a tree of applications spawned from the terminal, normally beginning with a shell. Of course the terminal could analyse the process tree to find its youngest "leaf" element but in theory there could be multiple and also it's not necessarily a leaf that is interacting with the terminal (imagine an editor has started some filter processes...).
    • Having said all this, we could talk about remapping things like function keys, or some of those useless keys like Break etc. If you have an idea to use one of those and how to configure them, tell me.
      Otherwise, about remapping control keys, that's not a terminal feature and I would prefer to close that issue.
  3. nowox commented on Jun 30, 2015

    @nowox

    Good remarks.

    For the identification of the running process we might simply monitor a cygwin2mintty communication file or even environment variables. With this first soltion one can identify the running context with something like:

    alias vim='echo -e "context=vim" > /dev/mintty; /usr/bin/vim'
    

    This could let us imagine plenty of other functionalities like:

    echo -e "fullscreen=1"

    To put mintty in fullscreen mode.

  4. mintty commented on Jul 1, 2015

    @mintty
    Owner

    I thought about something more straightforward like the remapping of useless keys as I had suggested.
    I have implemented options to map the Break and Pause keys. This fixes your original issue not having an Insert key, so I'll close the issue.
    The other idea to have some application-specific configuration really needs to settle for a while as I am hesitating to introduce any kind of process interaction here which might introduce unexpected trouble...

  5. mintty commented on Jul 2, 2015

    @mintty
    Owner

    To put mintty in fullscreen mode.

    ... you can easily send it respective escape sequences, ESC[9;1t or ESC[10;1t

  6. added a commit that references this issue on Sep 2, 2018
  7. added a commit that references this issue on Sep 19, 2018
  8. mintty commented on Sep 20, 2018

    @mintty
    Owner

    Released 2.9.1.

  9. mintty commented on Mar 25, 2022

    @mintty
    Owner

    Released 3.6.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions