12

After migrating to win7 paredit's forward slurp "C-)" no longer works and "C-right arrow" still works, rebinding the sexp to a different combination (such as C-0) works as well.
Does anyone have the same issue out there?

SwiftArchitect
  • 47,376
  • 28
  • 140
  • 179
siyu
  • 121
  • 5
  • I dont have windows box., but I dont think paredit is os specific.. – kindahero May 18 '12 at 04:34
  • 1
    Try `C-h k` `C-)` to see how it responses. i.e. does emacs receive the command, what's the bindings associated to it... – Daimrod May 18 '12 at 06:47
  • 1
    @Daimrod, I've just tried C-h k C-), and emacs did not receive the command, so it's not responding to it. – siyu May 18 '12 at 18:41
  • It look like some other sofeware/application use C+) as a qucik key. Please check your IM/dict runing with C+) binding. – Shuguang May 19 '12 at 04:16
  • Related to http://emacs.stackexchange.com/questions/9900/in-terminal-c-and-both-execute-evil-forward-sentence-i-want-c-to-run-par ? – SwiftArchitect Jan 19 '16 at 04:28

3 Answers3

6

Windows 7 uses Ctrl + Shift to switch languages, so Emacs is never getting the key strokes. You can change the binding with the following:

  • Control panel
  • Region and Language
  • Keyboards and Languages
  • Change Keyboards
  • Advanced Key Settings
  • Between input languages
  • Change Key Sequence
  • Switch Keyboard Layout
  • Not Assigned.

http://www.eightforums.com/general-support/22552-cant-use-ctrl-shift-0-windows-has.html

Mason
  • 81
  • 1
  • 2
  • 1
    In Windows 10, that becomes 'Control Panel -> Change input methods -> Advanced Settings -> Change language bar hot keys. I disabled the shortcuts there. – Apteryx Aug 17 '17 at 15:58
  • Mason, you are a life saver. Recently had to switch to windows for a project and have been slowly loosing my mind because of little things like this .... I guess eventually I will be productive again :) – Shane Oct 17 '18 at 16:46
  • Instructions for Windows 11: 1. Press the Start menu 2. Type "Settings" 3. Click "Devices" 4. In the left, click on "Typing" 5. At the bottom, click on "Advanced Keyboard Settings" 6. Click on "Input Language Hotkeys" 7. Click on "Change Key Sequence" 8. Note that Ctrl-Shift is selected. Change this to "Not Assigned" – user1462309 Mar 04 '22 at 01:07
1

It happens on Windows 7, if you have more than one input language. Ctrl-Shift-0, Ctrl-Shift-1, ... are for quick switching of the input language. Seems to be unfixable, as Windows intercepts certain key combinations (e.g. Win-E, Win-D, etc.) and doesn't pass it down to the application. Could be worse, Intel GMA driver doesn't let you use Ctrl-Alt-Up/Down on Win XP.

Just use another shortcut in Emacs (or you can try to remap keys using tools like, Sharpkeys).

EvgeniySharapov
  • 3,078
  • 3
  • 27
  • 38
  • Thanks for the suggestions, I don't have other input language other than English here, it must be other apps or drivers are taking the key combo. I probably just stick with the "C-right arrow" – siyu May 21 '12 at 20:36
1

Paredit version I have bind the forward slurp command to <C-right> and C-). I can verify that the latter key is consumed by the operating system, MS Windows 8 in my case, so Emacs can't receive that key. So you might want to use <C-right> instead, but then since that key (and also <C-left> which is bound to another paredit command) is normally for movement (outside of paredit), maybe you might want to use your own custom different key. I use C-*. The following is the configuration I use, and you can take the parts you want.

(require 'paredit)

(define-key paredit-mode-map (kbd "C-*") 'paredit-forward-slurp-sexp)

;; Make the key no longer bound to paredit-forward-barf-sexp
(define-key paredit-mode-map (kbd "<C-left>") nil)

;; Make the key no longer bound to paredit-forward-slurp-sexp
(define-key paredit-mode-map (kbd "<C-right>") nil)

(define-key paredit-mode-map (kbd "<C-backspace>") 'paredit-backward-kill-word)
Jisang Yoo
  • 3,670
  • 20
  • 31