#[SOLVED] Wanting to remap Z and Y key.

299 messages · Page 1 of 1 (latest)

rugged socket
#

Hey, so I have a CH keyboard layout but am used to the QWERTY. I came across keyd, which many said would solve my problem of wanting to switch the Y and Z key (all the other keys can stay that way). I'm not sure how to configure it. I used Bard to help me, it output this keyd.conf which it said to put in the /etc/keyd folder, which I did but it didn't work out, even after restarting. Can someone help me please? Thanks so much in regard.

Bard's config:

device "default" {
bind_key {
    key = "KEY_Z"
    symbol = "KEY_Y"
}

bind_key {
    key = "KEY_Y"
    symbol = "KEY_Z"
}
}
flint root
#

idk if it works but change key to XK_

#

eg XK_Z

rugged socket
#

you meant to replace all of the KEY to XK right?

flint root
#

hmm

flint root
#

"XK_Y"

#

"XK_Z"

rugged socket
#

yes exactly

flint root
#

if i were you i'd disassemble the keyboard and manually map it

rugged socket
#

i'm on a laptop unfortunately

flint root
#

oh

#

oh no

rugged socket
#

i somehow got off the keycaps and replaced them which works surprisingly well

#

i just switched from windows

flint root
#

hmm

rugged socket
#

well on my laptop that is, i have some linux experience from my pc

flint root
#

i remember a utility i used to map keys to emojis

rugged socket
#

wait i just tried running the command

flint root
#

ill try to find it

rugged socket
#

why wouldn't it be able to parse it?

flint root
#

oh

#

maybe

#

try chmod to 600

#

chmod 600 /etc/keyd/keyd.conf

rugged socket
#

do i have to run it as sudo?

flint root
#

yes

#

its in the /etc dir

rugged socket
#

well i did that, no output

#

do i have to run the keyd command?

#

sorry i'm really not too experienced at all

#

just did that, still failed to parse the config

flint root
#

hm

#

maybe use setxkbmap

#

localectl list-x11-keymap-layouts

#

setxkbmap us

rugged socket
#

or wait what if bard put in some spaces / tabs?

#

would that make it unparsable?

flint root
#

hmm

#

did you do it

#

@rugged socket

rugged socket
#

just did it, still the same

flint root
#

how

#

i swapped to ch

#

then to us

#

can you send the output

rugged socket
#

idk if i'm overseeing some beginner thing, i just installed it with yay and then put the config into the etc/keyd folder

flint root
#

btw

#

why are you using keyd

rugged socket
flint root
#

no

#

keyd is the issue

rugged socket
flint root
#

sudo yay -R keyd

rugged socket
#

and on my laptop i need the swiss characters so i wanna keep it the same, just swap z and y

flint root
#

oh

#

hold up

#

maybe use sxhkd

#

and make it swap layouts

rugged socket
#

that's not what i want tho

#

i manage all the special characters and everything

#

just the z y is very annoying

flint root
#

oh

#

there was a gui application for this

#

i think it was keymapper or something

#

this

rugged socket
#

i'll try, thanks

flint root
#

install keymapper

#

oh god

#

i changed to ch lazout and the character are so diffrent

rugged socket
#

ahahaaa my bad

#

i installed it but i don't think there's a gui?

#

when i type keymapper into kfinder there's nothing showing up

flint root
#

there is no gui

rugged socket
#

ohh alr

flint root
#

so my hunch was wrong

#

ig

rugged socket
#

uhm do you know about the syntax and where to put the config?

flint root
#

yes

#

$HOME/.config/keymapper.conf

#

for systemwide its /etc/keymapper.conf

#

inside keymapper.conf should be

 Z >> Y
 Y >> Z ```
#

so now Z is Y and Y is Z

rugged socket
#

do i have to start the prohram somehow? put the systemwide config

flint root
#

keymapperd

#

keymapperd

rugged socket
#

with the d?

flint root
#

yea

rugged socket
#

also there's no output or anything

flint root
#

try

rugged socket
#

i tried, doesn't work

flint root
#

i mean

#

setsid keymapperd &

rugged socket
flint root
#

ok

#

now try doing qwerty

#

if it stays as z i did smth wrong

rugged socket
#

wait what

#

just closed and reopened a terminal

flint root
#

hmm

rugged socket
#

sudo setsid keymapperd &
[2] 19760
[1] Done setsid keymapperd

flint root
#

yea

rugged socket
#

and this is when i run it as sudo

#

the install is about 2 months old tho, i can't currently get everything to update

#

sorry maybe shoulda told earlier

flint root
#

btw sorry for not being able to respond a key cap fell

rugged socket
#

no worries

#

uhm this comes a bit out of the blue but would you may be able to help me with my upgarde problem too?

#

this is what happens always

flint root
#

oh

#

this happened to me

#

do

#

sudo pacman-key --init

rugged socket
#

and i also do not understand when it does not upgrade ANY packages when afaik only one is corrupted

flint root
#

yeah

#

btw

#

your gpg keys are corrupted

#

you have to upgrade them

#

sudo pacman-key --init

#

sudo pacman-key --refresh-keys

#

and then do ctrl+c

#

after a bit

#

sudo pacman -S archlinux-keyring

rugged socket
#

uhm

#

how long to wait after the refresh keys command

flint root
#

if you want you can wait for all of the keys to refresh

#

but 30-45 seconds did the trick for me

rugged socket
#

i realize i'm asking noob questions but i understand pgp, what is the difference to gpg tho and is it only needed for package verification, similarly to how you can verify .onion mirros using pgp?

#

and whose keys are those

#

giving me random email addresses

flint root
#

they are archlinux organization members

rugged socket
#

and their gpg keys are invalid, similarly to how you can set pgp keys to expire?

flint root
#

idk whats pgp and gpg but i had this problem and i just had to refresh the keys

rugged socket
#

lmao okok

flint root
#

xd

rugged socket
#

tbh, i only know pgp encryption from sketch darknet market stuff haha

flint root
#

darknet :sus:

rugged socket
#

only a little

flint root
#

did it work

#

btw

rugged socket
#

it's still running lol

flint root
#

when the problem happened to me

rugged socket
#

line after line

flint root
#

shit

#

press CTRL+C

#

levente polyakk signatures expired

rugged socket
#

and now the other command?

flint root
#

which one did you finish

rugged socket
#

uhm you mean the last entry?

flint root
#

i mean

rugged socket
#

shortly after that, i ctrl c'd

flint root
#

did you finish sudo pacman-key --init or sudo pacman-key --refresh-keys

#

ok good

#

now

#

sudo pacman -S archlinux-keyring

rugged socket
#

yea i just did that

flint root
#

oh it worked

rugged socket
#

i think it did?

flint root
#

no errors?

rugged socket
#

can i do the yay command now?

#

you think it'll work?

flint root
#

hold up

#

do pacman -Sy

rugged socket
rugged socket
flint root
flint root
#

sy only initializes it

oak crystal
#

running -Sy is a bad idea

flint root
#

it is?

oak crystal
#

yes

#

it can cause a partial upgrade

flint root
#

oh yeah

oak crystal
#

you should always update everything when you update your package list

rugged socket
rugged socket
#

also i never even heard of the key signatures, only something from monero lol but do i have to run those same commands on my desktop pc aswell on a somewhat regular basis?

oak crystal
flint root
#

i forgot pacman syntax

rugged socket
oak crystal
#
-S sync operation
-y update package lists
-u update all packages
flint root
#

wait

#

if -y only updates package lists how is it a partial upgrade

oak crystal
#

because if you run that without updating everything, and then afterwards install some package, it could cause a newer version of some library to be installed, which breaks other software which depended on the older version of the library

#

someone here broke pacman a couple days ago from this

flint root
#

oh

#

thanks

flint root
#

but it only installs a new library

#

it doesn't delete older libs

rugged socket
#

@oak crystal sorry to bother but am I fin using the yaya wothout any dashes or does that pose the same risks as running pacman without the u

#

i mean -Sy instead of -Syu

oak crystal
#

running yay without any arguments just runs pacman -Syu and then updates all your AUR packages

#

do not use -Sy

rugged socket
#

ohh perfect thanks a ton!

rugged socket
oak crystal
flint root
#

ok

rugged socket
#

also yay is a cool asf command

flint root
#

makepkg uses 100% of my cpu

#

lol i might stick to only 1 core

oak crystal
#

makes sense, it is compiling software most likely

rugged socket
#

alr then thank yuou for helping me with the signatures, do you often have to update these or is this just because i did my arch linux install for the laptop on a 2 months old usb stick

flint root
#

can't i just get some binary

oak crystal
#

yes if there's a -bin package

flint root
#

anthraxx sigs expired then

rugged socket
#

ok but regardles of the iso, does one have to update their signatures gpg thingies regularly to avoid running into problems?

oak crystal
#

no, if you do it often enough you shouldn't have any key problems

flint root
#

hold up so it works know

rugged socket
flint root
#

nah the upgrade

rugged socket
#

yes yes i upgraded all my packages finally

#

thanks a ton

flint root
#

np

rugged socket
oak crystal
#

usually sudo pacman -S archlinux-keyring is all you need to do to fix it

rugged socket
#

ok thank you

flint root
#

thanks @oak crystal

spare spokeBOT
#

armv8 received a thank you cookie!

flint root
oak crystal
#

sometimes you need to do the other commands

flint root
#

yeah

oak crystal
#

the pacman-key stuff

flint root
#

im genuinly proud of my self for doing this without help from the arch wiki

rugged socket
#

i have stuff to do guys sorry will be b back thanks for the help in the meantime

flint root
#

np

young yarrow
#

I’ve used Dvorak on QWERTY keyboards for awhile. All the system cares about are the keycodes and they keymap in use, not the letters printed on the keys.

rugged socket
#

ok i'm here again

#

so i uninstalled and reinstalled keymapper

#

then i put a keymapper.conf file into the /etc folder with the content

Z >> Y
Y >> Z

and ran kaymapperd

#

ERROR: Initializing keymapper connection failed

#

this is what i got

#

any help would be much appreciated

flint root
#

Hmm

#

Doubt this will help but

#

its possible to make a script to change layouts to us and then switch back to ch

#

using sxhkd

rugged socket
#

unfortunately that's not an option :c i really want to use the äöü without switching layouts

flint root
#

how

#

§

rugged socket
#

but hold up, let me try again to use keyd, maybe it was somehow related to the keyring thing that i now solved

rugged socket
flint root
#

ü¨

rugged socket
#

haha yea

flint root
#

pü¨

#

pütin

#

lol this is like turkish

#

öü¨

rugged socket
#

it's german bro the umlaut is fucking patented by MY Language alright

#

lmao

#

also try shift and '

flint root
#

you dont use italian_

#

à

rugged socket
#

i mean shift and ;

flint root
#

lol this is fun

#

é

rugged socket
#

yea

flint root
#

finna change to french

rugged socket
#

that's why it's swiss, it's to cover french, italian and german

flint root
#

oh no its azerty

rugged socket
#

yeah the french keyboard layout is out of this world idfk wtf they be doing over there

flint root
#

i cant siwtch fck

rugged socket
#

lmao

#

alr lemme scroll up and redo all the keyd settings

flint root
#

I fixed it

#

unforseen dream scenarios that glorify beauty of a vacuum cleaner💀

rugged socket
#

ok so i will try putting this document into /etc/keyd as keyd.conf

device "default" {
bind_key {
key = "KEY_Z"
symbol = "KEY_Y"
}
bind_key {
key = "KEY_Y"
symbol = "KEY_Z"
}
}
#

this should IN THEORY work right

flint root
#

hmm

#

IN THEORY

#

xd

rugged socket
#

now i run sudo keyd

#

aaannnndd

#

CONFIG: parsing /etc/keyd/keyd.conf
DEVICE: WARNING failed to parse /etc/keyd/keyd.conf

#

damn

#

it shouldn't have anything to do with me using wayland tho right

#

I FUCKING GOT IT WORKING

#

so the syntax that google bard provided was simply dogshit

#
[ids]

*

[main]

y = z
z = y
#

this is how it works

#

alr i'm just stupid and everyone should use their ability to read

#

lesson learned

#

thanks for sticking around tho lol

flint root
#

np

#

... solved

timber lichenBOT
#

#9742 📣 If there is nothing else that we can do for you, please close this thread by adding "[SOLVED]" to the title.

  • You can do this on desktop by clicking the three dots on the top right of the page, and pressing "Edit Post".
  • You can also do this on Android / iOS by long tapping your post in the text channel list, and tapping "Edit Post".

Your title should be like so: https://cdn.discordapp.com/attachments/503224329191030787/1039841700417384498/image.png
Thank you

rugged socket
#

[SOLVED] Wanting to remap Z and Y key.