shortcut keys – Is it possible to have a different keyboard layout when capslock is on?


I’ve been using xmodmap to switch my alt keys and currently i’m mapping capslock to home button.

What i’m trying to do is creating keybindings based on caps lock. so for example if caps lock is on and i press A key instead of printing a capitalized A it would for example emmit the left arrow key. So it’s not like caps lock + A pressed at the same time, what i’m trying to achieve is having various key bindings when the caps lock is turned on and when it’s off having a normal keyboard.

Is this possible somehow? I’ve been googling for a while couldn’t find anything useful about the caps lock.