Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend and backspace issues with Linux in most applications #36

Closed
maluhia opened this issue Sep 5, 2023 · 10 comments
Closed

Extend and backspace issues with Linux in most applications #36

maluhia opened this issue Sep 5, 2023 · 10 comments

Comments

@maluhia
Copy link

maluhia commented Sep 5, 2023

I am having trouble getting extend to work with curl angle dh. I run
./setkb.sh 4ca
and get:

¤ ShortStr model/layout: pc104angle / us(cmk_ed_us)
¤ ShortStr lay. options: Curl(DH) - 'y'; Sym - 'n'.

¤ Changing dir to '/usr/share/X11/xkb'
¤ Looking for and removing any old .xkm server files
¤ Running setxkbmap command using the system XKB dir:

> setxkbmap -model pc104angle -layout us(cmk_ed_us) -option misc:extend,lv5:caps_switch_lock,grp:shifts_toggle,compose:menu,misc:cmk_curl_dh -v 9

Setting verbose level to 9
locale is C
Warning! Multiple definitions of keyboard model
         Using command line, ignoring X server
Warning! Multiple definitions of keyboard layout
         Using command line, ignoring X server
Trying to load rules file ./rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc104angle
layout:     us(cmk_ed_us)
options:    misc:extend,lv5:caps_switch_lock,grp:shifts_toggle,compose:menu,misc:cmk_curl_dh
Trying to build keymap using the following components:
keycodes:   evdev(pc104angle)+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+us(cmk_ed_us)+inet(evdev)+group(shifts_toggle)+compose(menu)+level5(caps_switch_lock)+extend(basic)+colemak(cmk_ed_dh)
geometry:   pc(pc104angle)

¤ Changing dir to '/home/user/git/BigBagKbdTrixXKB'

@@@ setkb.sh finished! @@@

which looks fine but extend backspace doesn't work in kde applications or konsole, but works fine in chrome. The arrow extend keys work everywhere though. I also tried to add the colemak layout via kde GUI keyboard settings but activating extend in the advanced tab completely disables ALL backspace features.

Having this be more compatible with KDE Keyboard gui would help greatly when swapping layouts and changing settings for casual users!

Sidenote but this k to m swap is milling ke haha! Need to retrain my muscle memory!

@DreymaR
Copy link
Owner

DreymaR commented Sep 6, 2023

I'm really not sure as to why KDE doesn't quite respect the XKB settings. Could it be that KDE has its own setting for Backspace behavior?

@maluhia
Copy link
Author

maluhia commented Sep 6, 2023

It my Keyboard Settings advanced tab, I have two options selected:

Compatibility options->Enable level5 Extend mappings (home position arrows etc)
Key to choose 5th level->Caps Lock chooses 5th level

I see what is going on now. When I hold Caps and press the extend backspace key, it interprets it as "Pause" when setting a custom shortcut... but in the Keyboard preview pane, it correctly show as triggering the backspace key. I suppose the KDE apps all think I am hitting Pause! Not sure what to do now.

@DreymaR
Copy link
Owner

DreymaR commented Sep 11, 2023

Why not just disable the Backspace mapping in the symbols/extend file?

@maluhia
Copy link
Author

maluhia commented Sep 11, 2023

I like the way backspace is in Extend though, with holding caps and pressing the key to the right of the Extend arrow keys. That is doesn't work in non-chrome apps means it is a KDE issue, right?

@DreymaR
Copy link
Owner

DreymaR commented Sep 12, 2023

What I mean is, the Extend mapping for the physical Backspace key should be Pause. Try disabling that. I could seem like KDE is redirecting the generated Backspace press so it gets re-interpreted as a Pause?

Another thing I could do is to check whether the level5 modifier is removed. Ideally it should always be, I guess, but in most cases things work without doing that explicitly.

@maluhia
Copy link
Author

maluhia commented Sep 12, 2023

I see, I tried to disable those backspace mappings as you suggested and reapplied the keyboard settings but it didnt work. I am not very savvy when it comes to x11 configurations so I think i'll just rely on my Input remapper solution: https://github.com/sezanzeb/input-remapper
If anyone comes along with KDE and tries to use Extend backspace, perhaps they'd be better suited to diagnose the issue...

@DreymaR
Copy link
Owner

DreymaR commented Sep 13, 2023

It is a conundrum at this point. I checked the file, and clearmods=LevelFive is applied to the key with Backspace on its Extend layer (Colemak O) as it should be. Maybe KDE somehow doesn't respect that clear? If it doesn't, then conceivably it could send Extend+Backspace which is Pause (as that's the level5 mapping for that key) instead of a pure Backspace when pressing Extend+O.

However, removing the Extend definition for the Backspace key itself should solve that issue. Otherwise, there would be no reason for Pause to be sent after pressing Extend+O. Maybe you didn't do it quite right, somehow? I advise using the setkb.sh script, as that has a cache clearing built in.

@maluhia
Copy link
Author

maluhia commented Sep 13, 2023

Alright, that solved it. Not sure if I did it correctly but I commented out lines 261-271 in the xkb-data_xmod/xkb/symbols/extend file, reinstalled with ./install-dreymar-xmod.sh, and selected the colemak layout angle Z in KDE keyboard settings hardware tab, added the colemak dh layout in the layout tab, and Selected "Enable level5 extend mappings, caps lock is a level 5 modifier" in the Advanced tab. It works now, KDE no longer sees it as Pause. Thanks! Wonder if you can account for this in the script somehow for other KDE users.

DreymaR added a commit that referenced this issue Sep 14, 2023
* #36
* Due to problems with KDE, Extend+Backspace is now off by default
* Backspace and Enter were joined in an "extend(lv5_sk)" partial
@DreymaR
Copy link
Owner

DreymaR commented Sep 14, 2023

You're right. I've turned off Extend-mapping for both the Backspace and Return/Enter keys by default.

I did it by putting those two keys over in a new partial group, and not including it by default. Same as I've done with the FK## keys, as many users didn't like how Extend-mapping the F-keys broke their TTY shortcuts.

Could you please test that the latest commit works as it should for you?

@maluhia
Copy link
Author

maluhia commented Sep 14, 2023

works!

@maluhia maluhia closed this as completed Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants