The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Fix Cyrillic input etc.

These changes was commited to the Birdfont repository Mon, 23 Jul 2018 17:47:03 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Mon, 23 Jul 2018 17:47:03 +0000 (19:47 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Mon, 23 Jul 2018 17:47:03 +0000 (19:47 +0200)
commit 8e77e296b8fa85edce8e6658e658bb3bd63ad49e
tree e77be00f1a219fa1f05d61b9259491910e574abc
parent d220eb699e22492af27267afe5d6534a8ae0c56f
Fix Cyrillic input etc.

birdfont/GtkWindow.vala
libbirdfont/KeyBindings.vala
--- a/birdfont/GtkWindow.vala +++ b/birdfont/GtkWindow.vala @@ -128,16 +128,33 @@ } key_press_event.connect ((t, event) => { - TabContent.key_press (event.keyval); - + unichar c; + + c = keyval_to_unicode (event.keyval); + + if (c != '\0') { + TabContent.key_press (c); + } else { + TabContent.key_press (event.keyval); + } + return false; }); key_release_event.connect ((t, event) => { - TabContent.key_release (event.keyval); + unichar c; + + c = keyval_to_unicode (event.keyval); + + if (c != '\0') { + TabContent.key_release (c); + } else { + TabContent.key_release (event.keyval); + } return false; }); + size_allocate.connect(() => { GlyphCanvas.redraw ();
--- a/libbirdfont/KeyBindings.vala +++ b/libbirdfont/KeyBindings.vala @@ -22,8 +22,8 @@ LEFT = 65361, PG_UP = 65365, PG_DOWN = 65366, - ENTER = 65293, - BACK_SPACE = 65288, + ENTER = 13, + BACK_SPACE = 8, SHIFT_LEFT = 65505, SHIFT_RIGHT = 65506, CTRL_LEFT = 65507,