diff --git a/data/key-mapper.glade b/data/key-mapper.glade
index dfdc4e6b..fb4fdfe9 100644
--- a/data/key-mapper.glade
+++ b/data/key-mapper.glade
@@ -1,45 +1,45 @@
-
+
diff --git a/keymapper/gtk/row.py b/keymapper/gtk/row.py
index 2d41967c..7fee30c9 100644
--- a/keymapper/gtk/row.py
+++ b/keymapper/gtk/row.py
@@ -26,13 +26,18 @@ import evdev
from gi.repository import Gtk, GLib
-from keymapper.state import custom_mapping
+from keymapper.state import custom_mapping, system_mapping
from keymapper.logger import logger
CTX_KEYCODE = 2
+store = Gtk.ListStore(str)
+for name in system_mapping.list_names():
+ store.append([name])
+
+
def to_string(ev_type, code):
"""A nice to show description of the pressed key."""
try:
@@ -156,6 +161,11 @@ class Row(Gtk.ListBoxRow):
previous=(None, None)
)
+ def match(self, completion, key, iter):
+ """Search the avilable names."""
+ value = store.get_value(iter, 0)
+ return key in value.lower()
+
def put_together(self, character):
"""Create all child GTK widgets and connect their signals."""
delete_button = Gtk.EventBox()
@@ -190,6 +200,12 @@ class Row(Gtk.ListBoxRow):
character_input.set_alignment(0.5)
character_input.set_width_chars(4)
character_input.set_has_frame(False)
+ completion = Gtk.EntryCompletion()
+ completion.set_model(store)
+ completion.set_text_column(0)
+ completion.set_match_func(self.match)
+ character_input.set_completion(completion)
+
if character is not None:
character_input.set_text(character)
character_input.connect(
diff --git a/readme/pylint.svg b/readme/pylint.svg
index 2eb20879..a31dd1ad 100644
--- a/readme/pylint.svg
+++ b/readme/pylint.svg
@@ -1,23 +1,23 @@
-