touchcursor-linux icon indicating copy to clipboard operation
touchcursor-linux copied to clipboard

Modifier key combination output

Open coderyangyangyang opened this issue 6 years ago • 8 comments
trafficstars

Really appreciate your code,it works well. You know in the Windows touchcursor, you can convert something like Space+x to Ctrl+y. Could you add this key combination remaping function to your code?

coderyangyangyang avatar Apr 14 '19 04:04 coderyangyangyang

The plan is to eventually have all the keys configurable from a conf file. I think your specific request would be to emit a modifier key and then a regular key for some keys, which I think would not be too hard. I will keep it in the back of my head while implementing the conf file.

donniebreve avatar May 19 '19 19:05 donniebreve

I second that. It would be nice if I can remap space+h from page up to enter.

AlienKevin avatar May 22 '19 10:05 AlienKevin

You should be able to remap space+h->enter now. The modifier key that coderyangyang asked for still needs some work.

donniebreve avatar May 24 '19 03:05 donniebreve

Hello, how are you doing with this feature? It is needed to remap VIM-like keybinding everywhere, like Y - copy, P - paste.

RomanRcT avatar Dec 09 '21 10:12 RomanRcT

Hey, as far as I know, it is still not possible to emit both a modifier key and an additional normal key at once by a single key press. Or am I wrong, @donniebreve? I have some modifier keys mapped as follows:

  • D to Ctrl and
  • S to Alt.

If curious, see my dotfiles repo for the configuration. It makes a huge difference for me by itself, but I must agree the requested functionality would be useful, too.

Adda0 avatar Dec 09 '21 11:12 Adda0

Another update.

I have implemented the feature requested by @coderyangyangyang in my C++ port (work-in-progress, nevertheless a working prototype). As of now, one can do mappings such as the following:

KEY_W=KEY_T,KEY_G
KEY_H=KEY_LEFTSHIFT+KEY_G
KEY_I=KEY_T,KEY_LEFTSHIFT+KEY_G,KEY_M,KEY_LEFTCTRL+KEY_V,KEY_F

<key>,<key> emits a sequence of keys (in the given order). For example, from the previous list, when pressing hyper key and key W, KEY_T,KEY_G would emit tg. <key>+<key> emits a combination of keys simultaneously pressed. That is, both keys are simultaneously pressed, then all released at the same time. For example, pressing hyper key with key H emits G (as in shift + g). Both sequences and combinations can be combined, of course.

Do you all think this functionality meets the requirements described in this issue? And of course, feel free to experiment with the WIP prototype, installed following the instructions, if you want to.

Adda0 avatar Jul 04 '22 14:07 Adda0

Also implemented in #59

It seems like Adda0 has a more fully-featured implementation. However, I spent some time earlier and couldn't get theirs to work on my computer. Plus #59 has a decent shot at getting merged.

magnus-ISU avatar Feb 18 '23 23:02 magnus-ISU

It seems like Adda0 has a more fully-featured implementation. However, I spent some time earlier and couldn't get theirs to work on my computer.

I would be interested in seeing what did not work out for you. I am using the linked version on my computers, so I would like to know what happened in your case, if you feel like analysing what went wrong on your side. If so, feel free to open an issue on my fork to discuss this further.

Adda0 avatar Feb 19 '23 15:02 Adda0

This was implemented in #59, right?

auouymous avatar Apr 05 '24 03:04 auouymous

Yes I believe it was.

donniebreve avatar Apr 05 '24 16:04 donniebreve