DevHeads.net

Keyboard re-mapping OOps sorry

Apologies for the aborted post:

I'm trying to remap some of the keys on my keyboard. Documemtation
seems to be somewhat sparse and/or incomplete.

I'm using suggestions on
<a href="https://unix.stackexchange.com/questions/65507/use-setxkbmap-to-swap-the-left-shift-and-left-control/65600#65600" title="https://unix.stackexchange.com/questions/65507/use-setxkbmap-to-swap-the-left-shift-and-left-control/65600#65600">https://unix.stackexchange.com/questions/65507/use-setxkbmap-to-swap-the...</a>
which suggested that I should use xkb tools.

I've followed the suggestion given as the best answer as best I can, and
have a local file:

xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include
"pc+gb(extd)+inet(evdev)+myswap(swap_pgdn_end)" }; xkb_geometry
{ include "pc(pc104)" }; };
partial modifier_keys
xkb_symbols "swap_pgdn_end" {
replace key <PGUP> { [ END ] };
replace key <END> { [ DELE ] };
replace key <PGDN> { [ PGUP ] };
replace key <INS> { [ PGDN ] };
};

But when I try to compile it I get
syntax error: line 9 of /home/psrwebs/.xkb/keymap/mykbd
last scanned symbol is: xkb_symbols
Errors encountered in /home/psrwebs/.xkb/keymap/mykbd;
not compiled

Can anyone offer any suggestions?
Thanks.

Comments

Re: Keyboard re-mapping OOps sorry

By Karl Auer at 10/08/2018 - 09:06

On Mon, 2018-10-08 at 14:23 +0100, Richard Kimber wrote:
The email system may have rearranged the config you sent. At any rate
it looks broken. Can you put the file somewhere we can look at it, like
pastebin?

Thanks, K.

Re: Keyboard re-mapping OOps sorry

By R Kimber at 10/08/2018 - 09:29

On Tue, 09 Oct 2018 01:06:06 +1100

Re: Keyboard re-mapping OOps sorry

By Karl Auer at 10/08/2018 - 09:53

On Mon, 2018-10-08 at 15:29 +0100, Richard Kimber wrote:
That's much better.

I haven't used xkb, but that second part (starts "partial") looks like
it should be in a separate file.

Also, the "swap_pgdn_end" thing comes after the place where you
reference it. That might work, but I wonder.

What happens if you split that file and load it as two parts (the
second part first)?

And with that, any xkb-fu I may have had is exhausted :-)

Good luck :-)

Regards, K.

Re: Keyboard re-mapping OOps sorry

By R Kimber at 10/08/2018 - 10:24

On Tue, 09 Oct 2018 01:53:19 +1100

Thanks. None of the sites I looked at mentioned separate files but I
could try reversing the order of the statements

- Richard.

Re: Keyboard re-mapping OOps sorry

By Colin Law at 10/08/2018 - 10:30

On Mon, 8 Oct 2018 at 16:26, Richard Kimber <

The link you originally provided says to use separate files
<a href="https://unix.stackexchange.com/questions/65507/use-setxkbmap-to-swap-the-left-shift-and-left-control/65600#65600" title="https://unix.stackexchange.com/questions/65507/use-setxkbmap-to-swap-the-left-shift-and-left-control/65600#65600">https://unix.stackexchange.com/questions/65507/use-setxkbmap-to-swap-the...</a>

Colin

Re: Keyboard re-mapping OOps sorry

By R Kimber at 10/08/2018 - 11:18

On Mon, 8 Oct 2018 16:30:43 +0100

Aaargh. Sorry. I've looked at so much in the last few hours that I got
hopelessly confused. Thanks.

However, Having got the files right, I now get an error on compilation:-

Internal error: Could not resolve keysym END
Internal error: Could not resolve keysym DELE
Internal error: Could not resolve keysym PGUP
Internal error: Could not resolve keysym PGDN

Should I be calling them something else? That's what theyre called on
the keyboard map Keyboard preferences -> Layouts -> show

- Richard

Re: Keyboard re-mapping OOps sorry

By Karl Auer at 10/08/2018 - 12:04

On Mon, 2018-10-08 at 17:18 +0100, Richard Kimber wrote:
They should be coming in from evdev....

Maybe you should unreverse the two files :-)

Regards, K.

Re: Keyboard re-mapping OOps sorry

By R Kimber at 10/08/2018 - 12:54

On Tue, 09 Oct 2018 04:04:59 +1100

Yes, they have the same names in /usr/share/X11/xkb/keycodes/evdev

Do you mean swap the
key <PGUP> { [ END ] };
for
key <END> { [ PGUP ] };
?

- Richard.

Re: Keyboard re-mapping OOps sorry

By Karl Auer at 10/08/2018 - 10:37

On Mon, 2018-10-08 at 16:30 +0100, Colin Law wrote:
Wow. A hole in one?

Regards, K.

Re: Keyboard re-mapping OOps sorry

By R Kimber at 10/08/2018 - 12:33

On Tue, 09 Oct 2018 02:37:47 +1100

:) Indeed. My apologies. It's been a difficult day.

- Richard