davatorium / rofi

Rofi: A window switcher, application launcher and dmenu replacement
https://davatorium.github.io/rofi/
Other
13.32k stars 614 forks source link

[BUG] Mapping Alt+^ (dead_circumflex) doesn't work (need raw key mapping) #1394

Closed bew closed 3 years ago

bew commented 3 years ago

Version

Output of rofi -v: Version: 1.7.0

Configuration

Output of rofi -help: https://gist.github.com/bew/453457c12d439dc6910ad93522778c90

Launch Command

rofi -show drun -kb-move-front 'Alt+dead_circumflex' -kb-custom-16 ''

NOTE: -kb-custom-16 '' is necessary to be able to bind Alt+^ to another action.

Steps to reproduce

What behavior you see

What behavior you expect to see

github-actions[bot] commented 3 years ago

@bew: hello! :wave:

This issue is being automatically closed because it does not follow the issue template.

bew commented 3 years ago

Really?!

DaveDavenport commented 3 years ago

not sure why bot triggered. (aah you removed the header, I will see if I can make it less paranoid).

Apologies.

bew commented 3 years ago

Yeah I removed unnecessary things and fixed a few typos in last 2 headers (behavior instead of behaviour) :eyes:

NOTE: @DaveDavenport if you want to enforce the template, you can use the new issue form system on github, see: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema Here is an example of how it looks: on neovim's repo

DaveDavenport commented 3 years ago

I am no expert on keyboard, but if you have us keyboard international layout typing ^e should results in ê. I do see that the above keybinding on us layout works for me. I need to test this, it used to work in the past.

DaveDavenport commented 3 years ago

Yeah I removed unnecessary things and fixed a few typos in last 2 headers (behavior instead of behaviour) eyes

NOTE: @DaveDavenport if you want to enforce the template, you can use the new issue form system on github, see: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema Here is an example of how it looks: on neovim's repo

Thanks, we will look into it.

DaveDavenport commented 3 years ago

Yeah I removed unnecessary things and fixed a few typos in last 2 headers (behavior instead of behaviour) eyes

I don't agree, as that depends if we use American English or British English. But that is why the bot complaints because it looks for headers.

bew commented 3 years ago

(requested on IRC) Result of setxkbmap -query:

rules:      evdev
model:      pc105
layout:     fr
DaveDavenport commented 3 years ago

Thanks, lets try to quickly summarize, because we ran into two issues:

In that keyboard layout '^' is a possible composite (right term) key and typing ^e results in ê, to type a ^ you need to type ^space. To the best of my knowledge we cannot map the 'raw' keycode yet (that would allow this mapping).

The second thing I noticed, that on different systems the ^ maps to either dead_circumflex (as bound by default in rofi) or asciicircum.

DaveDavenport commented 3 years ago

This patch to libnkutils fixes this behaviour I think, but needs to be validated as I know very little about this topic https://paste.xinu.at/Eb1/ (@sardemff7 )

sardemff7 commented 3 years ago

Sorry for the delay

As you can see in this very readable XML source for Docbook man pages you can bind a keycode (Alt+[34] in this case) but that wouldn’t work here as the Compose processing is eating the key altogether (Feel free to include the man page excerpt in rofi’s man page, though maybe add a warning it could be out of sync. I still hope to release libnkutils as standalone at some point that would avoid some of these updating issues)

@DaveDavenport’s patch looks good, and should work in all cases Just to be safe I’ll read it again later before committing, it’s been some time since I wrote this code

Thanks for the report and thanks for the patch!

sardemff7 commented 3 years ago

Fix included in bde8175d393d8dbd8998268480a370e6daf9370e

sardemff7 commented 3 years ago

Have anyone tested it yet?

bew commented 3 years ago

I've just tested with the latest next (currently at 05e84544)

Running with: ./rofi -show window -kb-move-front 'Alt+dead_circumflex' -kb-custom-16 '' -kb-move-end 'Alt+dollar,Alt+End' -kb-custom-14 ''

And the Alt bindings works perfectly :heart:

DaveDavenport commented 3 years ago

Thanks.!

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.