From mint-bounce@lists.fishpool.fi  Mon Jun 28 06:39:22 2010
Message-ID: <63123.8730597659-sendEmail@descaro>
From: "Helmut Karlowski" <helmut.karlowski@ish.de>
To: "mint@lists.fishpool.fi" <mint@lists.fishpool.fi>
Cc: "helmut.karlowski@ish.de" <helmut.karlowski@ish.de>
Subject: Re: [MiNT] Keyboard-problem with XaAES helmut-branch
Date: Mon, 28 Jun 2010 10:35:49 +0000
X-Mailer: sendEmail-1.55
MIME-Version: 1.0
Content-Type: multipart/related; boundary="----MIME delimiter for sendEmail-874455.211990611"
X-Antivirus: avast! (VPS 100628-0, 28.06.2010), Outbound message
X-Antivirus-Status: Clean
X-ecartis-version: Ecartis v1.0.0
Sender: mint-bounce@lists.fishpool.fi
Errors-to: mint-bounce@lists.fishpool.fi
X-original-sender: helmut.karlowski@ish.de
Precedence: bulk
List-help: <mailto:ecartis@lists.fishpool.fi?Subject=help>
List-unsubscribe: <mailto:mint-request@lists.fishpool.fi?Subject=unsubscribe>
List-Id: <mint.lists.fishpool.fi>
X-List-ID: <mint.lists.fishpool.fi>
List-subscribe: <mailto:mint-request@lists.fishpool.fi?Subject=subscribe>
List-owner: <mailto:tjhukkan@fishpool.fi>
List-post: <mailto:mint@lists.fishpool.fi>

This is a multi-part message in MIME format. To properly display this message you need a MIME-Version 1.0 compliant Email program.

------MIME delimiter for sendEmail-874455.211990611
Content-Type: text/plain;
  charset="iso-8859-1"
  Content-Transfer-Encoding: quoted-printable

Helmut Karlowski wrote:

> only possible under MiNT and toswin. I guess you can set your console to
> raw-mode, but I cannot find it atm (I used tcsetpgrp or similar, but I'm
> not sure if it really would work).

I'm using this in a non-GEM-program (stolen from somewhere):

void makeraw( struct termios *tattr )
{
	tattr->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
	/*tattr->c_iflag |= ICRNL;	/*no effect!?!*/
	tattr->c_oflag &= ~OPOST;
	tattr->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
	/*tattr->c_lflag |= ICANON;*/
	tattr->c_cflag &= ~(CSIZE|PARENB);
	tattr->c_cflag |= CS8;
	/*tattr->c_cflag |= CCTS_OFLOW|CRTS_IFLOW;*/

}


void
set_input_mode (int fileno)
{
	int i;
	struct termios tattr;
	char *name;


	/* Make sure fileno is a terminal. */
	if (!isatty (fileno))
	  {
	    fprintf (stderr, "Not a terminal.\n");
	    exit (EXIT_FAILURE);
	  }

	/* Save the terminal attributes so we can restore them later. */
	/*tcgetattr (fileno, &saved_attributes[i]);*/
	/*atexit (reset_input_mode_exit);*/
	/* Set the funny terminal modes. */
	tcgetattr (fileno, &tattr);
	makeraw( &tattr );
	/*tattr.c_lflag |= ICANON;*/
	/*tattr.c_lflag &= ~(ICANON|ECHO); /* Clear ICANON (no canonical input) and no ECHO. */
	tattr.c_cc[VMIN] = 0;
	/*tattr.c_cc[VMIN] = 16;*/
	tattr.c_cc[VTIME] = 1;	/*wait 0.4s? for input*/
	tcsetattr (fileno, TCSAFLUSH, &tattr);
}



-Helmut



------MIME delimiter for sendEmail-874455.211990611--


