summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/keysym-generator.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/keysym-generator.py b/scripts/keysym-generator.py
index a583e80..24b7b83 100755
--- a/scripts/keysym-generator.py
+++ b/scripts/keysym-generator.py
@@ -16,10 +16,20 @@ import logging
import os
import sys
import re
-import libevdev
import subprocess
from pathlib import Path
+try:
+ import libevdev
+except ModuleNotFoundError as e:
+ print(f"Error: {e}", file=sys.stderr)
+ print(
+ "One or more python modules are missing. Please install those "
+ "modules and re-run this tool."
+ )
+ sys.exit(77)
+
+
logging.basicConfig(level=logging.DEBUG, format="%(levelname)s: %(message)s")
logger = logging.getLogger("ksgen")