Skip to content
Browse files

updated to work with new keybind module

  • Loading branch information...
1 parent a3df591 commit e852d8c5af11434c2393b0178f5581771fbd84e8 @BurntSushi committed
Showing with 6 additions and 6 deletions.
  1. +6 −6 examples/window-marker.py
  2. 0 xpybutil/{keysym.py → keybind.py}
View
12 examples/window-marker.py
@@ -8,7 +8,7 @@
import xpybutil
import xpybutil.event as event
import xpybutil.ewmh as ewmh
-import xpybutil.keysym as keysym
+import xpybutil.keybind as keybind
epilog = '''
Using window-marker is exactly like using marks in vim. Namely, by pressing the
@@ -67,16 +67,16 @@ def start_get_letter(cb):
global grabbing
GS = xcb.xproto.GrabStatus
- if keysym.grab_keyboard(xpybutil.root).status == GS.Success:
+ if keybind.grab_keyboard(xpybutil.root).status == GS.Success:
grabbing = cb
def cb_get_letter(e):
global grabbing
if grabbing is not None:
- keysym.ungrab_keyboard()
- sym = keysym.get_keysym(e.detail)
- letter = keysym.get_keysym_string(sym)
+ keybind.ungrab_keyboard()
+ sym = keybind.get_keysym(e.detail)
+ letter = keybind.get_keysym_string(sym)
if len(letter) == 1 and ord(letter) in range(ord('a'), ord('z') + 1):
grabbing(letter.lower())
@@ -92,7 +92,7 @@ def cb_get_letter(e):
continue
fun = globals()[fun_str]
- if not keysym.bind_global_key('KeyPress', key_str, fun):
+ if not keybind.bind_global_key('KeyPress', key_str, fun):
print >> sys.stderr, 'Could not bind %s to %s' % (key_str, fun_str)
event.main()
View
0 xpybutil/keysym.py → xpybutil/keybind.py
File renamed without changes.

0 comments on commit e852d8c

Please sign in to comment.
Something went wrong with that request. Please try again.