lib/termconfig/linux.js
function gpmMouse( mode ) {

	var self = this ;

	if ( this.root.gpmHandler ) {
		this.root.gpmHandler.close() ;
		this.root.gpmHandler = undefined ;
	}

	if ( ! mode ) {
		//console.log( '>>>>> off <<<<<' ) ;
		return ;
	}

	this.root.gpmHandler = gpm.createHandler( { stdin: this.root.stdin , raw: false , mode: mode } ) ;

	//console.log( '>>>>>' , mode , '<<<<<' ) ;

	// Simply re-emit event
	this.root.gpmHandler.on( 'mouse' , ( name , data ) => {
		self.root.emit( 'mouse' , name , data ) ;
	} ) ;
	this.root.gpmHandler.on( 'error' , ( /* error */ ) => {
		//console.log( 'mouseDrag error:' , error ) ;
	} ) ;
}
function gpmMouse( mode ) {

	var self = this ;

	if ( this.root.gpmHandler ) {
		this.root.gpmHandler.close() ;
		this.root.gpmHandler = undefined ;
	}

	if ( ! mode ) {
		//console.log( '>>>>> off <<<<<' ) ;
		return ;
	}

	this.root.gpmHandler = gpm.createHandler( { stdin: this.root.stdin , raw: false , mode: mode } ) ;

	//console.log( '>>>>>' , mode , '<<<<<' ) ;

	// Simply re-emit event
	this.root.gpmHandler.on( 'mouse' , ( name , data ) => {
		self.root.emit( 'mouse' , name , data ) ;
	} ) ;
	this.root.gpmHandler.on( 'error' , ( /* error */ ) => {
		//console.log( 'mouseDrag error:' , error ) ;
	} ) ;
}
function gpmMouse ( mode ) { var self = this ; if ( this . root . gpmHandler ) { this . root . gpmHandler . close ( ) ; this . root . gpmHandler = undefined ; } if ( ! mode ) { //console.log( '>>>>> off <<<<<' ) ; return ; } this . root . gpmHandler = gpm . createHandler ( { stdin : this . root . stdin , raw : false , mode : mode } ) ; //console.log( '>>>>>' , mode , '<<<<<' ) ; // Simply re-emit event this . root . gpmHandler . on ( 'mouse' , ( name , data ) => { self . root . emit ( 'mouse' , name , data ) ; } ) ; this . root . gpmHandler . on ( 'error' , ( /* error */ ) => { //console.log( 'mouseDrag error:' , error ) ; } ) ; }
This is the code that handle GPM
This is the code that handle GPM