slang-users mailing list

[2004 Date Index] [2004 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-users] most and mouse-events


most patches isn't off-topic here I hope. 

It has the irritating disfeature of beeping on unexpected mouse-event.
One mouse right-click or scoll up/down could beep the PC-speaker multiple 
times. I can't image binding a "\033[M.." sequence in .mostrc will work, so 
this little patch makes it shut-up. Patch against 4.9.5:

--- orig/src/keym.c  Tue Jun 08 15:59:22 2004
+++ src/keym.c      Sun Aug 01 14:35:08 2004
@@ -141,6 +141,14 @@
      ;
    most_update_windows (-1);
 }
+
+#ifdef IBMPC_SYSTEM
+static void gobble_mouse_cmd(void)
+{
+  SLang_flush_input();
+}
+#endif
+
 #ifdef unix
 # include <signal.h>
 #endif
@@ -583,6 +591,7 @@
    SLkm_define_key ("\xE0I", (FVOID_STAR) page_up_cmd, Most_Keymap);
    SLkm_define_key ("\xE0G", (FVOID_STAR) top_of_buffer_cmd, Most_Keymap);
    SLkm_define_key ("\xE0O", (FVOID_STAR) end_of_buffer_cmd, Most_Keymap);
+   SLkm_define_key ("\033[M", (FVOID_STAR) gobble_mouse_cmd, Most_Keymap);
 #endif
    SLkm_define_key ("\t", (FVOID_STAR) page_right_cmd, Most_Keymap);
    SLkm_define_key ("^", (FVOID_STAR) previous_line_cmd, Most_Keymap);

-----------

I'm not sure the correct way to do this, but it works. One can still use the
console Quick-edit (right-click) menu and cut from most screen. And with
a little patch to S-Lang, I can use the mouse-wheel to scroll up/down. Very
handy. 

--gv


_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html


[2004 date index] [2004 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]