Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Keymapping: fix F-keys

  • Loading branch information...
commit 4f586e639114513396e23bb5ac9b254fa8fc4b2f 1 parent d15db2d
ec429 authored
Showing with 24 additions and 88 deletions.
  1. +12 −76 keymap.c
  2. +12 −12 keys
View
88 keymap.c
@@ -178,92 +178,28 @@ int initkeys(void)
kmap[29].mod[5]=126;
kmap[29].mod[6]=0;
kmap[30].name="F1";
- kmap[30].mod=malloc(4);
- kmap[30].mod[0]=27;
- kmap[30].mod[1]=79;
- kmap[30].mod[2]=80;
- kmap[30].mod[3]=0;
+ if(key_f1) kmap[30].mod=key_f1; else kmap[30].mod="";
kmap[31].name="F2";
- kmap[31].mod=malloc(4);
- kmap[31].mod[0]=27;
- kmap[31].mod[1]=79;
- kmap[31].mod[2]=81;
- kmap[31].mod[3]=0;
+ if(key_f2) kmap[31].mod=key_f2; else kmap[31].mod="";
kmap[32].name="F3";
- kmap[32].mod=malloc(4);
- kmap[32].mod[0]=27;
- kmap[32].mod[1]=79;
- kmap[32].mod[2]=82;
- kmap[32].mod[3]=0;
+ if(key_f3) kmap[32].mod=key_f3; else kmap[32].mod="";
kmap[33].name="F4";
- kmap[33].mod=malloc(4);
- kmap[33].mod[0]=27;
- kmap[33].mod[1]=79;
- kmap[33].mod[2]=83;
- kmap[33].mod[3]=0;
+ if(key_f4) kmap[33].mod=key_f4; else kmap[33].mod="";
kmap[34].name="F5";
- kmap[34].mod=malloc(6);
- kmap[34].mod[0]=27;
- kmap[34].mod[1]=91;
- kmap[34].mod[2]=49;
- kmap[34].mod[3]=53;
- kmap[34].mod[4]=126;
- kmap[34].mod[5]=0;
+ if(key_f5) kmap[34].mod=key_f5; else kmap[34].mod="";
kmap[35].name="F6";
- kmap[35].mod=malloc(6);
- kmap[35].mod[0]=27;
- kmap[35].mod[1]=91;
- kmap[35].mod[2]=49;
- kmap[35].mod[3]=55;
- kmap[35].mod[4]=126;
- kmap[35].mod[5]=0;
+ if(key_f6) kmap[35].mod=key_f6; else kmap[35].mod="";
kmap[36].name="F7";
- kmap[36].mod=malloc(6);
- kmap[36].mod[0]=27;
- kmap[36].mod[1]=91;
- kmap[36].mod[2]=49;
- kmap[36].mod[3]=56;
- kmap[36].mod[4]=126;
- kmap[36].mod[5]=0;
+ if(key_f7) kmap[36].mod=key_f7; else kmap[36].mod="";
kmap[37].name="F8";
- kmap[37].mod=malloc(6);
- kmap[37].mod[0]=27;
- kmap[37].mod[1]=91;
- kmap[37].mod[2]=49;
- kmap[37].mod[3]=57;
- kmap[37].mod[4]=126;
- kmap[37].mod[5]=0;
+ if(key_f8) kmap[37].mod=key_f8; else kmap[37].mod="";
kmap[38].name="F9";
- kmap[38].mod=malloc(6);
- kmap[38].mod[0]=27;
- kmap[38].mod[1]=91;
- kmap[38].mod[2]=50;
- kmap[38].mod[3]=48;
- kmap[38].mod[4]=126;
- kmap[38].mod[5]=0;
+ if(key_f9) kmap[38].mod=key_f9; else kmap[38].mod="";
kmap[39].name="F10";
- kmap[39].mod=malloc(6);
- kmap[39].mod[0]=27;
- kmap[39].mod[1]=91;
- kmap[39].mod[2]=50;
- kmap[39].mod[3]=49;
- kmap[39].mod[4]=126;
- kmap[39].mod[5]=0;
+ if(key_f10) kmap[39].mod=key_f10; else kmap[39].mod="";
kmap[40].name="F11";
- kmap[40].mod=malloc(6);
- kmap[40].mod[0]=27;
- kmap[40].mod[1]=91;
- kmap[40].mod[2]=50;
- kmap[40].mod[3]=51;
- kmap[40].mod[4]=126;
- kmap[40].mod[5]=0;
+ if(key_f11) kmap[40].mod=key_f11; else kmap[40].mod="";
kmap[41].name="F12";
- kmap[41].mod=malloc(6);
- kmap[41].mod[0]=27;
- kmap[41].mod[1]=91;
- kmap[41].mod[2]=50;
- kmap[41].mod[3]=52;
- kmap[41].mod[4]=126;
- kmap[41].mod[5]=0;
+ if(key_f12) kmap[41].mod=key_f12; else kmap[41].mod="";
return(0);
}
View
24 keys
@@ -28,15 +28,15 @@ CPGUP 1b5b353b357e
APGUP 1b5b353b337e
CPGDN 1b5b363b357e
APGDN 1b5b363b337e
-F1 1b4f50
-F2 1b4f51
-F3 1b4f52
-F4 1b4f53
-F5 1b5b31357e
-F6 1b5b31377e
-F7 1b5b31387e
-F8 1b5b31397e
-F9 1b5b32307e
-F10 1b5b32317e
-F11 1b5b32337e
-F12 1b5b32347e
+F1 :key_f1
+F2 :key_f2
+F3 :key_f3
+F4 :key_f4
+F5 :key_f5
+F6 :key_f6
+F7 :key_f7
+F8 :key_f8
+F9 :key_f9
+F10 :key_f10
+F11 :key_f11
+F12 :key_f12
Please sign in to comment.
Something went wrong with that request. Please try again.