Xterm.js: Support fast scrolling using a modifier key

Created on 6 Aug 2019  路  5Comments  路  Source: xtermjs/xterm.js

Downstream: https://github.com/microsoft/vscode/issues/78431

VS Code has a setting editor.fastScrollSensitivity which multiplies the scroll speed when a particular modifier is down. This should be pretty easy to implement, we need to think about how the API should look. We probably need a number for the multiplier and an enum for which modifier (see https://github.com/microsoft/vscode/pull/78555).

aremouse-support good first issue help wanted typenhancement

All 5 comments

Proposal:

fastScrollSensitivity: number
// undefined = disabled, default alt?
fastScrollModifier: 'alt' | 'ctrl' | 'shift' | undefined

Hello,

I am looking for a good first issue to get started in open source projects and this one seems doable. May I try to tackle this? Do you have any hint about where to start?

Thank you!

@csurquin sure, this is a good one as it's pretty well defined. You should be able to find all the places you need to add a setting for by following one of the existing settings, eg.

https://github.com/xtermjs/xterm.js/blob/a89771a8de58fbc7a82323fb7d6d9c421ef63535/src/common/services/OptionsService.ts#L25

I think these are only the places where the scroll would need to be multiplied:

https://github.com/xtermjs/xterm.js/blob/a89771a8de58fbc7a82323fb7d6d9c421ef63535/src/browser/Viewport.ts#L171-L209

I made a pull request for this feature. I hope I did it the right way.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jestapinski picture jestapinski  路  3Comments

johnpoth picture johnpoth  路  3Comments

Tyriar picture Tyriar  路  4Comments

fabiospampinato picture fabiospampinato  路  4Comments

albinekb picture albinekb  路  4Comments