Ticket #39405

mouse wheel events not translated to cursor keys

Open Date: 2019-07-17 02:07 Last Update: 2019-07-26 13:14

Reporter:
(Anonymous)
Owner:
(None)
Type:
Status:
Open
Component:
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Works For Me
File:
1
Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

Details

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:

ESC [?1000h
ESC [?1h

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?

cheers, rob :-) rozee@mail.com

Ticket History (3/8 Histories)

2019-07-17 02:07 Updated by: None
  • New Ticket "mouse wheel events not translated to cursor keys" created
2019-07-17 12:41 Updated by: maya
  • Resolution Update from None to Works For Me
  • Component Update from (None) to Tera Term
Comment

Thank you for your reporting.


It seems to work fine in my environment.

  • save TERATERM.INI with TranslateWheelToCursor=on
  • reload setting ( [Setup]-[Restore setup] or restart Tera Term)
  • less some file in remote host
  • wheel the mouse
  • scroll bar of Tera Term is not scrolls, a file which is displaying with less is scrolls


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.

2019-07-17 20:24 Updated by: robert-rozee
Comment

hi,

have finally managed to create an OSDN account :-)

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:

'--------------------------

Const ESC=Chr$(27)

Print

Print ESC "[?1000h";

Print ESC "[?1h";

Do

Do : A$=Inkey$: Loop Until A$<>""
If A$=Chr$(27) Then Print
If Asc(A$)<32 Then Print "<" Str$(Asc(A$)) ">"; Else Print A$;

Loop Until A$=Chr$(26)

Print ESC "[?1l"

Print ESC "[?1000l";

Print

'--------------------------

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.

cheers, rob :-)

(Edited, 2019-07-17 20:26 Updated by: robert-rozee)
2019-07-18 13:09 Updated by: doda
  • Details Updated
2019-07-18 15:07 Updated by: maya
Comment

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.

2019-07-18 21:47 Updated by: robert-rozee
Comment

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.

cheers, rob :-)

(Edited, 2019-07-20 14:34 Updated by: robert-rozee)
2019-07-26 13:14 Updated by: robert-rozee
Comment

followup:

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: https://ttssh2.osdn.jp/manual/en/usage/tips/appkeypad.html to read "Application cursor mode

In this mode, the arrow keys do not send the same key sequences. For example, UP ARROW sends <ESC>OA sequence. Also, IF NO MOUSE MODE HAS BEEN SELECTED, Tera Term would send UP ARROW or DOWN ARROW key sequence instead of scrolling through the window by rotating the mouse wheel. "

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'.

cheers, rob :-)

(Edited, 2019-07-26 13:18 Updated by: robert-rozee)

Attachment File List

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login