Skip to content
This repository has been archived by the owner on Dec 26, 2020. It is now read-only.

Configurable to allow Caps to be mapped to other things #4

Open
jasonm23 opened this issue Nov 21, 2016 · 6 comments
Open

Configurable to allow Caps to be mapped to other things #4

jasonm23 opened this issue Nov 21, 2016 · 6 comments

Comments

@jasonm23
Copy link

It would be nice if we could map Caps to be other things too.

Obviously this may be beyond your intended scope as these mappings already satisfy a common Vim use case (especially when migrating from Karabiner/OS X)

Anyway I thought I would ask the question before deciding to fork or not.

Thanks for building this.

@oblitum
Copy link
Owner

oblitum commented Nov 21, 2016

As I've commented here, I'm working on a more general tool where caps2esc will be just an special case. I'll leave this open until I finish the other tool.

For your information, it's gonna be more or less like this:

intercept -g $DEVICE | caps2esc | other_mapping | uinput -d $DEVICE

intercept will be a tool to capture input from a given $DEVICE (grabbing it or not through the -g flag) and output it to stdout. caps2esc and other_mapping will be responsible solely for reading input events from stdin and outputting mutated events (or not) to stdout. uinput will be a tool to capture events from stdin and emulating them through a virtual device which can be constructed based on existing ones (-d flag) or through configuration files.

interception will be another tool that will accept a configuration file and will just monitor devices and execute any command when a given attached device matches the configuration. And any command can be one like the one above.

@Ran4
Copy link

Ran4 commented May 10, 2017

I personally really like that caps2esc does one thing, and one thing only. Any other tools would be cool, of course, but caps2esc staying the same would be nice.

@oblitum
Copy link
Owner

oblitum commented May 10, 2017

@Ran4 I agree. When I go about publishing the general tool I will provide an alternative caps2esc while this one will still live on its own.

@dragon788
Copy link

I look forward to your new tool, I'm finding that it grabbing all the xinput items without a filter is conflicting with the xinput-toggle utility that I need for another purpose.

@oblitum
Copy link
Owner

oblitum commented Jul 25, 2017

@dragon788 caps2esc is now superseded by this more general project https://gitlab.com/interception/linux/tools, you can use it already to filter specific devices by name or other characteristics. A more generalized caps2escplugin regarding key configurations will come later.

@silenc3r
Copy link

silenc3r commented Aug 22, 2017

I like caps2esc being simple but I would prefer to have Esc work as Esc and have CapsLock toggle on Ctrl. It looks like simple tweak but sadly I don't know C.

Edit: Nevermind, changing line 88 to

if (output[0].code == KEY_LEFTCTRL)

did the trick. C ain't that hard ;).

YoukouTenhouin pushed a commit to YoukouTenhouin/caps2esc that referenced this issue Apr 30, 2023
SYN events and different event timestamps are necessary for sending
sequential key events of the same key.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants