remap-keys / remap

Keymap Customization Web app for your keyboard.
https://remap-keys.app
Other
227 stars 27 forks source link

Edit keymap with keyboard #705

Closed sekigon-gonnoc closed 2 years ago

sekigon-gonnoc commented 2 years ago

This pull request enables editing keymap with keyboard.

Resolves #702

yoichiro commented 2 years ago

@sekigon-gonnoc I checked some behaviors before reviewing the code. For example, when typing Q on the Q key,

Screenshot_20220322_122034

my expected behavior is that the key doesn't change anything. However, Remap displayed that the key has been changed.

Screenshot_20220322_122111

I think that the correct behavior is that the Q key is not be changed.

How do you think about this?

yoichiro commented 2 years ago

@sekigon-gonnoc For example, when trying setting the _ key by pressing SHIFT+- physical key binding,

Screenshot_20220322_123930

Instead of setting the _ character, but *shift was set. This behavior is not my expected behavior.

Screenshot_20220322_123947

Is the actual behavior your expected behavior?

sekigon-gonnoc commented 2 years ago

I checked some behaviors before reviewing the code. For example, when typing Q on the Q key,

my expected behavior is that the key doesn't change anything. However, Remap displayed that the key has been changed.

I think that the correct behavior is that the Q key is not be changed.

How do you think about this?

I fixed this in the latest commits. Now keys aren't updated if pressed key is same as current keymap.

sekigon-gonnoc commented 2 years ago

For example, when trying setting the key by pressing SHIFT+- physical key binding, Instead of setting the character, but *shift was set. This behavior is not my expected behavior. Is the actual behavior your expected behavior?

Currently, yes, this is expected behavior. I implemented this for basic 'without mods' and 'single mod' keycodes. A simple idea for improvement is:

This may make it possible to set some symbol keycodes. Do you have any ideas?

yoichiro commented 2 years ago

@sekigon-gonnoc Thank you for the idea. Well, I have decided that I respect your implementation and your original idea. Therefore, I intend to release your code. After that, if we receive some feedback, we can discuss about them.

I will merge this pull request after changing some logic and structures.