Hi everybody,
This is not about Persian writing in particular, but about keyboard 
mapping. Since I know here a few people who had contributed to keyboard 
mappings, I ask my questions here, sorry for the off-topic :)
I am interested in converting a word written, inadvertently, in one 
language to another one. Let's say I wanted to write "Linux", but my 
keyboard layout was ir_IR, i.e. ISIRI-2901, and I got "«هدعط"; I want to 
convert that garbage to "Linux".
My questions:
   1. At first, I thought my best bet is to use XKB tools/libraries as 
it seemed to me there are more standardized. I learned `xkbcomp` [1] can 
convert between two file formats, .xkm and .xkb, but couldn't find any 
such file in my Linux installation. Do you know where they reside?
   2. Then I went with Linux keymap files and kbd. It seems more 
straightforward. I just wonder if there is any compiled or processed 
form of mapping files ("/usr/share/keymaps/i386/qwerty/fa.map.gz") that 
I could use in my program. I'm also curious if `dumpkeys` [2] can read 
those files.
   3. Last and least! Does any open-source tool exist that does what I 
want to do? I know If I search "ذذز.زخپ" in Google, it shows "
bbc.com" 
for the first result and it is not in the website's meta, as far as I 
can see. Is there any published software for this kind of translation?
Thanks for reading,
Amir
1: 
https://linux.die.net/man/1/xkbcomp
2: 
https://man7.org/linux/man-pages/man1/dumpkeys.1.html