Erratic key press events in Sway


I am experiencing erratic key press events when switching between windows in Garuda Sway version. I have a mechanical keyboard and when I switch between windows in the same workspace, I see either ctrl key or the d key pressed. I usually have android studio open in the other window with the VI mode and it's annoying when I switch to the window and see the lines are getting deleted by the d key presses.

I couldn't find anything on this issue on the internet and I cant say if this is a bug from sway wm or due to the customizations from Garuda. Anybody seen this behaviour before? I also see some errors on the sway output which may or may not be related to this issue.

sway[2085]: Errors from xkbcomp are not fatal to the X server
sway[2085]: The XKEYBOARD keymap compiler (xkbcomp) reports:
sway[2085]: > Warning:          Unsupported maximum keycode 708, clipping.
sway[2085]: >                   X11 cannot support keycodes above 255.
sway[2085]: > Warning:          Could not resolve keysym XF86BrightnessAuto
sway[2085]: > Warning:          Could not resolve keysym XF86DisplayOff
sway[2085]: > Warning:          Could not resolve keysym XF86Info
sway[2085]: > Warning:          Could not resolve keysym XF86AspectRatio
sway[2085]: > Warning:          Could not resolve keysym XF86DVD

inxi -Faz output:

System:    Kernel: 5.14.9-zen2-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0
           parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=f2b4c64f-8256-4fd4-85f3-1c9f5eb2b12f rw
           [email protected] quiet
           root=/dev/mapper/luks-ba2921b5-4f57-47d7-a4e9-8437ad581ed8 splash rd.udev.log_priority=3 vt.global_cursor_default=0
           systemd.unified_cgroup_hierarchy=1 loglevel=3 i915.i915_enable_fbc=1 i915.lvds_downclock=1 drm.vblankoffdelay=1
           i915.disable_power_well=1 i915.enable_cmd_parser=1 i915.enable_ppgtt=1 i915.fastboot=1 i915.i915_enable_rc6=1
           i915.lvds_use_ssc=0 i915.modeset=1 i915.powersave=1 i915.reset=0 i915.semaphores=1 i915.use_mmio_flip=1
           vblank_mode=0 nmi_watchdog=0 nouveau.modeset=0
           Desktop: sway 1.6.1 vt: 1 dm: N/A Distro: Garuda Linux base: Arch Linux
Machine:   Type: Laptop System: Dell product: Precision 5540 v: N/A serial: <filter> Chassis: type: 10 serial: <filter>
           Mobo: Dell model: 0FMYX6 v: A00 serial: <filter> UEFI: Dell v: 1.12.0 date: 06/10/2021
Battery:   ID-1: BAT0 charge: 30.4 Wh (100.0%) condition: 30.4/56.0 Wh (54.3%) volts: 12.5 min: 11.4 model: BYD DELL CP6DF01
           type: Li-poly serial: <filter> status: Full
CPU:       Info: 8-Core model: Intel Core i9-9880H bits: 64 type: MT MCP arch: Kaby Lake note: check family: 6
           model-id: 9E (158) stepping: D (13) microcode: EA cache: L2: 16 MiB
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 73598
           Speed: 4700 MHz min/max: 800/4800 MHz Core speeds (MHz): 1: 4700 2: 4699 3: 4701 4: 4694 5: 4686 6: 4684 7: 4459
           8: 4698 9: 4689 10: 4786 11: 4741 12: 4675 13: 4795 14: 4802 15: 4799 16: 4802
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled
           Type: l1tf status: Not affected
           Type: mds status: Not affected
           Type: meltdown status: Not affected
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
           Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB filling
           Type: srbds mitigation: TSX disabled
           Type: tsx_async_abort mitigation: TSX disabled
Graphics:  Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] vendor: Dell driver: i915 v: kernel bus-ID: 00:02.0
           chip-ID: 8086:3e9b class-ID: 0300
           Device-2: NVIDIA TU117GLM [Quadro T2000 Mobile / Max-Q] driver: N/A alternate: nouveau bus-ID: 01:00.0
           chip-ID: 10de:1fb8 class-ID: 0302
           Device-3: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo bus-ID: 1-12:4 chip-ID: 0c45:6723 class-ID: 0e02
           Display: wayland server: N/A compositor: sway v: 1.6.1 driver: loaded: N/A display-ID: 1
           resolution: <missing: xdpyinfo>
           OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 21.2.3 direct render: Yes
Audio:     Device-1: Intel Cannon Lake PCH cAVS vendor: Dell driver: snd_hda_intel v: kernel
           alternate: snd_soc_skl,snd_sof_pci_intel_cnl bus-ID: 00:1f.3 chip-ID: 8086:a348 class-ID: 0403
           Sound Server-1: ALSA v: k5.14.9-zen2-1-zen running: yes
           Sound Server-2: sndio v: N/A running: no
           Sound Server-3: JACK v: 1.9.19 running: no
           Sound Server-4: PulseAudio v: 15.0 running: no
           Sound Server-5: PipeWire v: 0.3.38 running: yes
Network:   Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel port: 3000 bus-ID: 3b:00.0 chip-ID: 8086:2723
           class-ID: 0280
           IF: wlp59s0 state: up mac: <filter>
           Device-2: Realtek RTL8153 Gigabit Ethernet Adapter type: USB driver: r8152 bus-ID: 4-1.3:3 chip-ID: 0bda:8153
           class-ID: 0000 serial: <filter>
           IF: enp58s0u1u3 state: down mac: <filter>
Bluetooth: Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-4:2 chip-ID: 8087:0029 class-ID: e001
           Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Drives:    Local Storage: total: 476.94 GiB used: 46.37 GiB (9.7%)
           SMART Message: Required tool smartctl not installed. Check --recommends
           ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Micron model: 2200S NVMe 512GB size: 476.94 GiB block-size:
           physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 22001070 temp: 38.9 C
           scheme: GPT
Partition: ID-1: / raw-size: 248.32 GiB size: 248.32 GiB (100.00%) used: 46.29 GiB (18.6%) fs: btrfs dev: /dev/dm-0
           maj-min: 254:0 mapped: luks-ba2921b5-4f57-47d7-a4e9-8437ad581ed8
           ID-2: /boot/efi raw-size: 180 MiB size: 176 MiB (97.78%) used: 78.2 MiB (44.5%) fs: vfat dev: /dev/nvme0n1p1
           maj-min: 259:1
           ID-3: /home raw-size: 248.32 GiB size: 248.32 GiB (100.00%) used: 46.29 GiB (18.6%) fs: btrfs dev: /dev/dm-0
           maj-min: 254:0 mapped: luks-ba2921b5-4f57-47d7-a4e9-8437ad581ed8
           ID-4: /var/log raw-size: 248.32 GiB size: 248.32 GiB (100.00%) used: 46.29 GiB (18.6%) fs: btrfs dev: /dev/dm-0
           maj-min: 254:0 mapped: luks-ba2921b5-4f57-47d7-a4e9-8437ad581ed8
           ID-5: /var/tmp raw-size: 248.32 GiB size: 248.32 GiB (100.00%) used: 46.29 GiB (18.6%) fs: btrfs dev: /dev/dm-0
           maj-min: 254:0 mapped: luks-ba2921b5-4f57-47d7-a4e9-8437ad581ed8
Swap:      Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
           ID-1: swap-1 type: zram size: 30.96 GiB used: 0 KiB (0.0%) priority: 100 dev: /dev/zram0
Sensors:   System Temperatures: cpu: 62.0 C mobo: N/A
           Fan Speeds (RPM): cpu: 2413 fan-2: 2422
Info:      Processes: 393 Uptime: 13m wakeups: 5 Memory: 30.96 GiB used: 5.05 GiB (16.3%) Init: systemd v: 249 tool: systemctl
           Compilers: gcc: 11.1.0 clang: 12.0.1 Packages: pacman: 1219 lib: 308 Shell: Zsh v: 5.8 running-in: alacritty
           inxi: 3.3.06