on windows there are several key maps applications that replaces Caps lock with ESC on a single 'press and relase' and with a Control signal if hold and another key is pressed.
Is there any way to do something similar on linux? Ideally on the whole system, but if it is only for X window it is fine too.
i'm currently writting scripts with the xautomation package tools. but i guess there is already a better way to do that via configurations.