From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?6YOt5pmT5bOw?= Newsgroups: gmane.emacs.help Subject: Fwd: Different scan code behavior in X and console Date: Sat, 14 Jan 2012 17:14:15 -0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=e89a8f6432c204f1ea04b686d114 X-Trace: dough.gmane.org 1326594193 27538 80.91.229.12 (15 Jan 2012 02:23:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 15 Jan 2012 02:23:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 15 03:23:06 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RmFkP-0005cd-1F for geh-help-gnu-emacs@m.gmane.org; Sun, 15 Jan 2012 03:23:05 +0100 Original-Received: from localhost ([::1]:48269 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmFkO-0007ZZ-Jo for geh-help-gnu-emacs@m.gmane.org; Sat, 14 Jan 2012 21:23:04 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:52901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmEft-0003EP-RG for help-gnu-emacs@gnu.org; Sat, 14 Jan 2012 20:14:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RmEfp-0000Jn-1J for help-gnu-emacs@gnu.org; Sat, 14 Jan 2012 20:14:21 -0500 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:45836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmEfo-0000HU-UR for help-gnu-emacs@gnu.org; Sat, 14 Jan 2012 20:14:17 -0500 Original-Received: by iacb35 with SMTP id b35so31449iac.0 for ; Sat, 14 Jan 2012 17:14:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=oEQoWYTyneddnFMW54qmrBta5DIOIkFc9XOBRJuapPI=; b=KbUCB0K4G4gVL6peHqLk82C+R7jl+xAHwx2bVcZAG9OeZth9PHC9ku74pzTuDYWjr0 1qQJwMSYF4ZABrygsVDxIx0/whFwmF4PlzOCwNLKQHlkiWiuc6r0/KUdjkDW/5Ttq8wB sT10CMrGJIo58kzNekIcEW3U4tbHI7Nh1SvTo= Original-Received: by 10.50.135.1 with SMTP id po1mr6817670igb.26.1326590055477; Sat, 14 Jan 2012 17:14:15 -0800 (PST) Original-Received: by 10.42.239.70 with HTTP; Sat, 14 Jan 2012 17:14:15 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.169 X-Mailman-Approved-At: Sat, 14 Jan 2012 21:23:00 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:83506 Archived-At: --e89a8f6432c204f1ea04b686d114 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Forward a mail I just sent to linux-console@ Any idea on this? If this problem can be resolved, I pretty sure CUA can be enabled in console mode, including ssh pts. ---------- Forwarded message ---------- From: Date: Sat, Jan 14, 2012 at 4:52 PM Subject: Different scan code behavior in X and console To: linux-console@vger.kernel.org Hi there, Sorry to bother. Not sure whether it is correct to post this question to the mail list, but can't find a suitable linux console user mail list for discussing this. If you have good mail list to suggest, please help me to forward. Thanks! The question is: I tried to make my emacs have the same key response on both X and console (ssh pts). However, I can't find scan code for "Ctrl-PageDown" in console mode. I attached the code for testing the scan code, and below is different behavior in X and console: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D X =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Press a Key 338 =A0 // Just type Press a Key 27 Press a Key 91 Press a Key 54 Press a Key 59 Press a Key 53 Press a Key 126 =A0// 6-chars for =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Console =3D=3D=3D=3D=3D=3D=3D=3D=3D Press a Key 338 =A0// Same for Press a Key =A0 =A0 =A0 =A0 // No response for Any idea on this? Greatly appreciate your replies, your suggested readings, and so on! Best Regards, Lamu Guo =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3DBelow is text of the code, for easil= y reading to skip attachment=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D #include #include #include int main(void) { =A0WINDOW *_window =3D initscr(); =A0int _rows; =A0int _cols; =A0cbreak(); =A0/* Accept all keys */ =A0keypad(_window, true); =A0/* Don't echo things that are typed */ =A0noecho(); =A0/* Get the screen dimensions */ =A0getmaxyx(_window, _rows, _cols); =A0/* Don't display cursor */ =A0curs_set(0); =A0for (;;) =A0{ =A0 =A0printw("Press a Key "); =A0 =A0refresh(); =A0 =A0int key =3D wgetch(_window); =A0 =A0printw("%d \n", key); =A0} =A0endwin(); =A0return 0; } --e89a8f6432c204f1ea04b686d114 Content-Type: text/x-csrc; charset=US-ASCII; name="curin2.c" Content-Disposition: attachment; filename="curin2.c" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gxfcnt6k0 I2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5jbHVkZSA8Y3R5cGUuaD4KI2luY2x1ZGUgPGN1cnNlcy5o PgoKaW50IG1haW4odm9pZCkKewogIFdJTkRPVyAqX3dpbmRvdyA9IGluaXRzY3IoKTsKICBpbnQg X3Jvd3M7CiAgaW50IF9jb2xzOwoKICBjYnJlYWsoKTsKCiAgLyogQWNjZXB0IGFsbCBrZXlzICov CiAga2V5cGFkKF93aW5kb3csIHRydWUpOwoKICAvKiBEb24ndCBlY2hvIHRoaW5ncyB0aGF0IGFy ZSB0eXBlZCAqLwogIG5vZWNobygpOwoKICAvKiBHZXQgdGhlIHNjcmVlbiBkaW1lbnNpb25zICov CiAgZ2V0bWF4eXgoX3dpbmRvdywgX3Jvd3MsIF9jb2xzKTsKCiAgLyogRG9uJ3QgZGlzcGxheSBj dXJzb3IgKi8KICBjdXJzX3NldCgwKTsKCiAgZm9yICg7OykKICB7CiAgICBwcmludHcoIlByZXNz IGEgS2V5ICIpOwogICAgcmVmcmVzaCgpOwogICAgaW50IGtleSA9IHdnZXRjaChfd2luZG93KTsK ICAgIHByaW50dygiJWQgXG4iLCBrZXkpOwogIH0KCiAgZW5kd2luKCk7CgogIHJldHVybiAwOwp9 Cg== --e89a8f6432c204f1ea04b686d114--