From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Creating custom key maps for stock bindings Date: Mon, 20 Jan 2020 17:10:32 -0800 (PST) Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="16807"; mail-complaints-to="usenet@ciao.gmane.io" To: Tim Johnson , MLEmacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 21 02:13:17 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iti6X-0004LI-Kq for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 21 Jan 2020 02:13:17 +0100 Original-Received: from localhost ([::1]:46570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iti6W-0003Gi-LL for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 20 Jan 2020 20:13:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42026) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iti69-0003EA-Sv for Help-gnu-emacs@gnu.org; Mon, 20 Jan 2020 20:12:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iti68-0001EX-M4 for Help-gnu-emacs@gnu.org; Mon, 20 Jan 2020 20:12:53 -0500 Original-Received: from userp2120.oracle.com ([156.151.31.85]:59030) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iti68-0001EB-Dp for Help-gnu-emacs@gnu.org; Mon, 20 Jan 2020 20:12:52 -0500 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00L18QxD135910; Tue, 21 Jan 2020 01:12:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=x4swKSB8BjsWFOH+RGOCUJycAZUf/MO+74NQXcDvg0k=; b=A6emD38pR6ZcKpic91igfyP1ko5E0NUholNPfcsBqpKm5qNAdvnDlRb6LYhGRba1Nnr0 1tWMKITr/M4EEfoPC6as0xw2LmAtPBwb4hcSjue3KkRRJguxWILHe5vo2hCG4S3qx+KS 3BrF3VnSyjYgW9s5Z12Q8dMc/fU4+5ksK894FIuX68D7PMfatoSPTMA7kaPaNUrvxHkL SF5Y1NhfgrZbaSwa+JdjTa2XnVmngRzAC7HJsDik1A8juZFSuMcFTitpACfUEpYkas9g JHdH8HHgHvQV1b1m3OUiFa0WPjbywGfLXxJY8cIZOrypg5HaGXZ8IGXgE8qpzdtXfWOC ZA== Original-Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 2xktnr1ua0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 Jan 2020 01:12:34 +0000 Original-Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00L195Im186013; Tue, 21 Jan 2020 01:10:34 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3020.oracle.com with ESMTP id 2xnpea7gvh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 Jan 2020 01:10:34 +0000 Original-Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 00L1AXk7016031; Tue, 21 Jan 2020 01:10:33 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4954.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9506 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001210007 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9506 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001210007 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.85 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:122254 Archived-At: > it occurs to me that I could rebind existing=20 > singleton modifier key into something like this > (simple examples only): >=20 > tj-control-keymap, containing all the commands which have a control- > char combinations >=20 > tj-alt-keymap, containing all the commands which have a alt-char > combinations >=20 > tj-control-alt-keymap, containing all the commands which have a > control-alt-char combinations >=20 > The question I have, to avoid possible unforeseen problems down the > road, do I need to unset all of these keys before rebinding them to > custom keymaps? A modifier key is not, by itself, a key sequence. So you can't bind, say, `C-' to `tj-control-keymap'. But you can certainly bind each of the maps you mention to a real key sequence, which could be a single key (other than a modifier key). And in that case, no, you don't need to unset any existing key bindings. (Of course, if the key you bind one of those maps to is already bound to some command or another keymap then it will no longer be available for that original binding, if you rebind it.) See, for example, the value of variable `ctl-x-map', which is bound to all of the key sequences that start with `C-x'.