I'm a Pattachote typist and recently noticed ibus-libthai got few keys incorrect mapped in Pattachote layout and have proceed to patch it to the correct key. This patch changes the key in the following position in Pattachote layout:
0xEA (Mai Tri)
0xEB (Mai Chattawa)
0xD2 (Sara Aa)
0xD3 (Sara Am)
Without this patch, it's not possible to Pattachote user to type Mai Chattawa and Sara Am. Not sure if I should patch somewhere else too (keycode_to_tis that calls thai_map_keycode seems to be unused?) but the keys seems to be working now from my local testing.
Fix incorrect keys in Pattachote layout.
0xEA (Mai Tri) -> 0xEB (Mai Chattawa)
0xD2 (Sara Aa) -> 0xD3 (Sara Am)
Thank you for your pull request. Yes, from a quick check, the two characters seem to be missing from pattachote_keycode_map, which should be fix.
Regarding the other place, it's keyval_to_tis() that has not got called. It's an old mapping method based on QWERTY character conversion, which can be confusing when mixed with XKB key translation. I changed it to direct keyboard scan code mapping in some version, while still keeping the old code as a spare part. But thinking it twice, I should just remove the unused code anyway.
In short, no other change is needed. I'll re-check your patch soon, before merging it.