donniebreve / touchcursor-linux

TouchCursor style keyboard remapping for Linux.
GNU General Public License v2.0
134 stars 29 forks source link

Modifier key combination output #10

Closed coderyangyangyang closed 7 months ago

coderyangyangyang commented 5 years ago

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?

donniebreve commented 5 years ago

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.

AlienKevin commented 5 years ago

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

donniebreve commented 5 years ago

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

RomanRcT commented 2 years ago

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

Adda0 commented 2 years ago

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:

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 commented 2 years ago

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.

magnus-ISU commented 1 year ago

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.

Adda0 commented 1 year ago

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.

auouymous commented 7 months ago

This was implemented in #59, right?

donniebreve commented 7 months ago

Yes I believe it was.