xmodmap settings not working

Message
Author
User avatar
Freja
Developer
Posts: 795
Joined: Thu May 02, 2019 2:15 pm

xmodmap settings not working

#1 Post by Freja »

Hello.

I am not in a rush,
but I want to replace "left control"key and "Left Alt" Key.
I tried to use xmodmap.

Code: Select all

xmodmap "$HOME/.Xmodmap"
Now, on the xev command results, Key is successful replaced.
But not replaced actual typing result. I using fcitx.

(This new mapping is an easy-to-use mod for users familiar
with the Mac keyboard command key. Alt=Command Key)

Any ideas?

Code: Select all

Snapshot created on:
System:    Kernel: 5.16.0-5mx-amd64 [5.16.14-1~mx21+1] x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.16.0-5mx-amd64 
           root=UUID=<filter> ro quiet splash 
           Desktop: Xfce 4.18.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm 4.18.0 vt: 7 
           dm: LightDM 1.26.0 Distro: MX-21.3_ahs_x64 Wildflower April 9  2022 
           base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Laptop System: Sony product: SVP11216CGS v: C60C3FAU serial: <filter> Chassis: 
           type: 10 serial: <filter> 
           Mobo: Sony model: VAIO serial: <filter> UEFI: American Megatrends v: R1045V7 
           date: 05/19/2015 
Battery:   ID-1: BAT0 charge: 32.1 Wh (100.0%) condition: 32.1/32.6 Wh (98.5%) volts: 8.4 min: 7.5 
           model: Sony Corp. type: Li-ion serial: N/A status: Not charging 
CPU:       Info: Dual Core model: Intel Core i5-4200U bits: 64 type: MT MCP arch: Haswell 
           family: 6 model-id: 45 (69) stepping: 1 microcode: 26 cache: L2: 3 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 bogomips: 18357 
           Speed: 1951 MHz min/max: 800/2600 MHz Core speeds (MHz): 1: 1951 2: 1594 3: 1584 
           4: 2257 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX unsupported 
           Type: l1tf mitigation: PTE Inversion 
           Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 
           mitigation: Retpolines, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
           Type: srbds mitigation: Microcode 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel Haswell-ULT Integrated Graphics vendor: Sony driver: i915 v: kernel 
           bus-ID: 00:02.0 chip-ID: 8086:0a16 class-ID: 0300 
           Device-2: Realtek Front Camera type: USB driver: uvcvideo bus-ID: 2-5:4 
           chip-ID: 0bda:5793 class-ID: 0e02 serial: <filter> 
           Display: x11 server: X.Org 1.20.14 compositor: xfwm4 v: 4.18.0 driver: loaded: intel 
           display-ID: :0.0 screens: 1 
           Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") 
           s-diag: 582mm (22.9") 
           Monitor-1: eDP1 res: 1920x1080 hz: 60 dpi: 188 size: 260x150mm (10.2x5.9") 
           diag: 300mm (11.8") 
           OpenGL: renderer: Mesa Intel HD Graphics 4400 (HSW GT2) v: 4.6 Mesa 22.2.0 
           direct render: Yes 
Audio:     Device-1: Intel Haswell-ULT HD Audio vendor: Sony driver: snd_hda_intel v: kernel 
           bus-ID: 00:03.0 chip-ID: 8086:0a0c class-ID: 0403 
           Device-2: Intel 8 Series HD Audio vendor: Sony driver: snd_hda_intel v: kernel 
           bus-ID: 00:1b.0 chip-ID: 8086:9c20 class-ID: 0403 
           Sound Server-1: ALSA v: k5.16.0-5mx-amd64 running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Intel Wireless 7260 driver: iwlwifi v: kernel modules: wl port: f040 
           bus-ID: 01:00.0 chip-ID: 8086:08b1 class-ID: 0280 
           IF: wlan0 state: up mac: <filter> 
Bluetooth: Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 
           bus-ID: 2-6:5 chip-ID: 8087:07dc class-ID: e001 
           Report: hciconfig ID: hci0 rfk-id: 4 state: up address: <filter> bt-v: 2.1 lmp-v: 4.0 
           sub-v: 500 hci-v: 4.0 rev: 500 
           Info: acl-mtu: 1021:5 sco-mtu: 96:5 link-policy: rswitch hold sniff 
           link-mode: slave accept service-classes: rendering, capturing, object transfer, audio 
Drives:    Local Storage: total: 119.24 GiB used: 71.69 GiB (60.1%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: MZNTD128HAGM-00000 size: 119.24 GiB 
           block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> 
           rev: 300Q scheme: GPT 
Partition: ID-1: / raw-size: 113.23 GiB size: 110.9 GiB (97.94%) used: 71.69 GiB (64.6%) fs: ext4 
           dev: /dev/sda2 maj-min: 8:2 
           ID-2: /boot/efi raw-size: 256 MiB size: 252 MiB (98.46%) used: 411 KiB (0.2%) fs: vfat 
           dev: /dev/sda1 maj-min: 8:1 
Swap:      Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 5.75 GiB used: 1.8 MiB (0.0%) priority: -2 
           dev: /dev/sda3 maj-min: 8:3 
Sensors:   System Temperatures: cpu: 75.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Repos:     Packages: 2376 note: see --pkg apt: 2369 lib: 1223 flatpak: 7 
           No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://deb.debian.org/debian bullseye-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://deb.debian.org/debian bullseye main contrib non-free
           2: deb http://security.debian.org/debian-security bullseye-security main contrib non-free
           3: deb-src http://deb.debian.org/debian bullseye main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://ftp.riken.jp/Linux/mxlinux/mx/repo/ bullseye main non-free
           2: deb http://ftp.riken.jp/Linux/mxlinux/mx/testrepo/ bullseye test
           3: deb http://ftp.riken.jp/Linux/mxlinux/mx/repo/ bullseye ahs
Info:      Processes: 239 Uptime: 34m wakeups: 3 Memory: 3.75 GiB used: 2.15 GiB (57.4%) 
           Init: SysVinit v: 2.96 runlevel: 5 default: 5 tool: systemctl Compilers: gcc: 10.2.1 
           alt: 10 Client: shell wrapper v: 5.1.4-release inxi: 3.3.06 
Boot Mode: UEFI
In the world filled desire,
I seek only essence, serve for MX.
I just needing only ideal in the art at all.
I want to protect place of rest called MX LINUX. :coffee:
VAIO Corporation's VAIO S11 Brown (FHD) @extrox

User avatar
herbie
Posts: 33
Joined: Tue Mar 27, 2018 3:13 pm

Re: xmodmap settings not working

#2 Post by herbie »

Here is how I do it.
File is
swapalt

Code: Select all

#!/bin/bash
sleep 0.5 && /bin/bash -c "sleep 5; /usr/bin/xmodmap /home/$USER/.Xmodmap"
and here is my .Xmodmap

Code: Select all

clear control
clear mod1
keycode 37 = Alt_L Meta_L
keycode 64 = Control_L
add control = Control_L Control_R
add mod1 = Alt_L Meta_L
[/ code]

the swapalt 
is in my startup at login.

User avatar
Freja
Developer
Posts: 795
Joined: Thu May 02, 2019 2:15 pm

Re: xmodmap settings not working

#3 Post by Freja »

Thank you very much,
I’ll try it in tomorrow!
In the world filled desire,
I seek only essence, serve for MX.
I just needing only ideal in the art at all.
I want to protect place of rest called MX LINUX. :coffee:
VAIO Corporation's VAIO S11 Brown (FHD) @extrox

User avatar
herbie
Posts: 33
Joined: Tue Mar 27, 2018 3:13 pm

Re: xmodmap settings not working

#4 Post by herbie »

You're very welcome,


User avatar
Freja
Developer
Posts: 795
Joined: Thu May 02, 2019 2:15 pm

Re: xmodmap settings not working

#6 Post by Freja »

and here is my .Xmodmap

Code: Select all

clear control
clear mod1
keycode 37 = Alt_L Meta_L
keycode 64 = Control_L
add control = Control_L Control_R
add mod1 = Alt_L Meta_L
It just works in my case!!
Thanks again!

Comfortable...
In the world filled desire,
I seek only essence, serve for MX.
I just needing only ideal in the art at all.
I want to protect place of rest called MX LINUX. :coffee:
VAIO Corporation's VAIO S11 Brown (FHD) @extrox

Post Reply

Return to “Hardware /Configuration”