Howto realize different input encodings?

What I want to do is to implement an input encoding in the form that if I press a ‘b’ the syriac character beth (0x0712) should appear. The overall plan is to define input encodings for languages like Syriac, Arabic, …
Is this possible with CodeMirror? Please, give me some hints, or tell me where I can find relevant informations.
Thank you very much for your help.

You can define your own keymaps, and you can use those to bind keys to functions that insert whichever character you want at the cursor position.

Thank you for your answer.
What I have done is this:

var keyMap =
{‘Shift-B’: function(cm){
var current = cm.doc.getCursor();
var matchStart = Pos(current.line,;
var matchEnd = Pos(current.line,;
It works fine, but if I replace ‘Shift-B’ with ‘b’ alone I get only a ‘b’ and not a ‘beth’.
What should I do?
Thank you,

You can bind to "B" (the B key) or to "'b'" (quoted literal char), binding to "b" does nothing.