mouse wheel events not translated to cursor keys
i've been trying to configure teraterm so that mouse wheel events translate to VT cursor up/down key escape sequences. so far, zero success. the problem appears to be that the TranslateWheelTo Cursor setting in teraterm.ini is being ignored, and taken as always being set to false.
the sequence i've been using to enable the mouse is as follows:
the first line (...1000h) turns on mouse reporting - mouse click events are reported correctly.
the second line (...1h), as far as i can tell, should enable 'application cursor mode', which should cause the mouse wheel to NOT scroll the TeraTerm window, but instead send cursor up/down escape codes. instead, the window just continues to scroll. note that i do see the cursor keys themselves return alternate cursor escape sequences (ESC OA etc instead of ESC [A etc) as expected
is this a bug, or am i missing something else?
Thank you for your reporting.
It seems to work fine in my environment.
Is your TERATERM.INI is really loaded by ttermpro.exe? To confirm, change some other value (e.g. Title) of TERATERM.INI and check it is changed.
And TranslateWheelToCursor setting is special option, then the value of it is not confirm in setting dialog. You wrote "TranslateWheelTo Cursor" (includes white space), if really it is in TERATERM.INI, it is typo.
1. the line "TranslateWheelToCursor=on" is present in teraterm.ini. i have also edited the title to "Title=Tera Term HERE" and this is displayed correctly. i've attached a copy of the modified teraterm.ini file.
2. the test program i'm using (written in basic and running on an attached microcontroller) is as follows:
Print ESC "[?1000h";
Print ESC "[?1h";
Loop Until A$=Chr$(26)
Print ESC "[?1l"
Print ESC "[?1000l";
3. i'm using a clean install of teraterm 4.103 that was installed after an older version was uninstalled and the teraterm directory removed from "Program Files". os is windowsXP home. with all the above, turning the mouse wheel still persists in scrolling the window and reports no escape sequences.
When both Mouse Tracking Mode and Application Cursor Mode are enabled, Mouse Tracking Mode overrides Application Cursor Mode.
Mouse wheel will be sent as button 4 and button 5 pressed event.
i'm afraid i'm still having next to no luck. i've tried using ESC [?1007h instead, with no result, and even found a reference to ESC [?7786h (enables mouse wheel to cursor key translation), but this does nothing useful.
i have had a SMALL amount of success, in that i have found that if the SHIFT key on the keyboard is held down, then the mouse wheel does generate mouse position escape sequences with button values of ascii 64 and 65. but i would rather not have to require the user to hold down the shift key if at all possible!
just to sumarize: i've found NO way to configure TeraTerm so that simply rotating the mouse wheel causes an escape sequence of any sort to be generated.
i think i can now understand how TeraTerm is working.
ESC [?1h changes cursor key responses from ESC "[A" etc to ESC"OA" etc. it also turns on mouse wheel to cursor key (original) sequence translation. ie, mouse wheel generates ESC "[A". mouse wheel translation can be considered a 'later' addition in that traditional terminals didn't have mouses.
ESC [?1000h inhibits the mouse wheel generating cursor key sequences, instead (if the mouse mode used supports it) enabling mouse wheel reporting as button 4/5 events.
as such, there is no way to have BOTH (a) mouse click reporting AND (b) mouse wheel translation to cursor key sequences at the same time. none of the documention makes this entirely clear, and the matter is confused by slightly different terms being used to describe the same thing.
might i suggest reworking this page:
to read "Application cursor mode
also, adding a third option to the setting:
TranslateWheelToCursor = on | off | forced
where if set to FORCED then mouse wheel translation to cursor key sequences always occur, irrespective of any mouse mode setting.
i believe this ticket can now be marked as 'resolved'.