jhylands

VIM controlled Capslock

Jan 2nd, 2021
1,477
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. #! /usr/bin/env python
  2.  
  3. from ctypes import *
  4. import subprocess
  5.  
  6. class Display(Structure):
  7.     """ opaque struct """
  8.  
  9. X11 = cdll.LoadLibrary("libX11.so.6")
  10. X11.XOpenDisplay.restype = POINTER(Display)
  11.  
  12. display = X11.XOpenDisplay(c_int(0))
  13. X11.XkbLockModifiers(display, c_uint(0x0100), c_uint(2), c_uint(0))
  14. X11.XCloseDisplay(display)
  15.  
Advertisement
Add Comment
Please, Sign In to add comment