Menu

#142 Strange behavior of Ctrl+Shift+V

1.0
open
nobody
None
2022-09-29
2022-08-09
DV
No

I noticed a strange behavior of Ctrl+Shift+V (paste as plain text). You see, I have Ctrl+Shift assigned to change input language in Windows, and each time I press Ctrl+Shift+V, it pastes a plain text plus it changes the input language. I'd expect ClipAngel to remove the Ctrl+Shift keyboard event from the queue when it processes Ctrl+Shift+V, but apparently it does not happen.

Discussion

  • tormozit

    tormozit - 2022-08-09

    This problem is old. I found no solution.
    When user press CTRL+SHIFT+<some key=""> to execute paste, ClipAngel emulates press CTRL+V. But correct emulation requires
    1. Emulate <pressup> event for every key modifiers (CTRL, SHIFT, ALT, Win).
    2. Emulate <pressdown> event for CTRL+V.
    3. Emulate <pressup> event for CTRL+V.
    And in same time user physically releases keys on keyboard - in your case CTRL+SHIFT+V. It looks like this keyboard events cross and not planned key events appear.</pressup></pressdown></pressup></some>

    Try assign to paste actions key combination without SHIFT.

     
  • DV

    DV - 2022-08-10

    In some C# project, the following technique is used to "remove" a key press when it is processed by us:

    private void Edit_KeyPress(object sender, KeyPressEventArgs e)
    {
        if (e.KeyChar == '\x7F')
        {
            e.KeyChar = '\x00'; // removes the key press
        }
    }
    

    Maybe similar approach can be used in ClipAngel to deal with KeyPress and KeyDown?

     

Log in to post a comment.