From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-users-return-23627-ml=inbox.vuxu.org@zsh.org X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.1 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id f3612a81 for ; Fri, 14 Sep 2018 11:50:46 +0000 (UTC) Received: (qmail 12258 invoked by alias); 14 Sep 2018 11:50:28 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23627 Received: (qmail 19225 invoked by uid 1010); 14 Sep 2018 11:50:27 -0000 X-Qmail-Scanner-Diagnostics: from know-smtprelay-omc-3.server.virginmedia.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(80.0.253.67):SA:0(-1.9/5.0):. Processed in 4.299266 secs); 14 Sep 2018 11:50:27 -0000 X-Envelope-From: dave@dawoodfall.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Originating-IP: [82.40.94.2] X-Authenticated-User: X-Spam: 0 X-Authority: v=2.3 cv=QvlwI26d c=1 sm=1 tr=0 a=EH02hVpzcg1gP5HQFHlsKw==:117 a=EH02hVpzcg1gP5HQFHlsKw==:17 a=IkcTkHD0fZMA:10 a=EyKrcRgpC7qjZboESYUA:9 a=QEXdDO2ut3YA:10 Date: Fri, 14 Sep 2018 12:38:41 +0100 From: David Woodfall To: Zsh Users Subject: Strange problem with bindkey keys passing through to apps Message-ID: <20180914113841.GA7435@blackswan> Mail-Followup-To: Zsh Users MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.10.1+44 (f0772c95) (2018-07-17) X-CMAE-Envelope: MS4wfFvzIPVvgTx0ztXYfniQ1eXWAva33xqHWqvv5I+rIcCcbKhmYR5PHNUONBrwQeoNUvKjmhcNtxbpQuE/WZ/zL4fKhI4m4kgY97AmRV71hDrjuQ8QLV4P JgUgIA1Ot7QQUf6j+Qxhqg/U8y2/VlkSvQw= I have setup a bind to make a printf code to switch to previous console. For screen some extra escapes are needed. This is in a plain linux console, not in an xterm type of terminal. The binds work fine except when I try to use them while running an app - e.g. weechat, mutt - they fail and e.g. mutt will see it as the bind to save the mail. It seems that zsh isn't grabbing the keys for some reason and they are falling through to the apps. This is what my test and function look like: if [ "$TERM" = "linux" ]; then zle -N _prev_cons _prev_cons() { printf '\e[15]' } bindkey -M viins "^[s" _prev_cons bindkey -M vicmd "^[s" _prev_cons elif [[ $TERM =~ screen ]]; then zle -N _prev_cons _prev_cons() { printf '\eP\e[15]\e\\' } bindkey -M viins "^[s" _prev_cons bindkey -M vicmd "^[s" _prev_cons fi bindkey -L | grep _prev_cons shows them to exist. Any ideas why these are passing through to apps and not grabbed by the shell? -Dave -- Linux is obsolete -- Andrew Tanenbaum .--. oo (____)// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'