deadpixi / sam

An updated version of the sam text editor.
Other
430 stars 46 forks source link

Make more keyboard keys usable #100

Open TobiasKarnat opened 4 years ago

TobiasKarnat commented 4 years ago

Please consider this patch to make the Home and End key useful and also add KP_Separator for the german NumPad Decimal separator.

diff -urN sam/doc/samrc sam/doc/samrc
--- sam/doc/samrc   2019-08-29 21:42:59.416074469 +0200
+++ sam/doc/samrc   2019-08-29 21:44:16.813148832 +0200
@@ -1,8 +1,10 @@
 # This is samrc as I usually use it.

-# Control-A/E jumps to beginning/end of line
+# Control-A/E and Home/End jumps to beginning/end of line
 bind C a command bol
 bind C e command eol
+bind * Home command bol
+bind * End command eol

 # Control-H/L/J/K moves left/right/down/up
 bind C h command charleft
diff -urN sam/samterm/samrc.c sam/samterm/samrc.c
--- sam/samterm/samrc.c 2019-08-29 21:42:59.420074525 +0200
+++ sam/samterm/samrc.c 2019-08-29 21:43:27.084458520 +0200
@@ -154,6 +154,7 @@
     {0,           XK_KP_Subtract,   Kraw,     '-',      NULL},
     {0,           XK_KP_Add,        Kraw,     '+',      NULL},
     {0,           XK_KP_Decimal,    Kraw,     '.',      NULL},
+    {0,           XK_KP_Separator,  Kraw,     ',',      NULL},
     {0,           XK_hyphen,        Kraw,     '-',      NULL},

     /* Support traditional control sequences. */