Coqide Key Bindings Bug(?) - keyboard

I'm having a bit of an odd problem... recently I've been having some odd situations arising whilst using CoqIDE, namely:
I can't type the letter "v" without holding down the windows/super key.
Pressing backspace moves the focus to the previous tab if multiple windows are open, I can't delete things with it. CTRL+backspace works for deleting chunks though.
The first of the two (may have) happened after I changed my keymap from US to GB but switching back and forth hasn't solved the problem.
Running ARCH linux, everything is up to date and no other applications are affected, I don't have sticky keys on.
Thanks for any suggestions!
EDIT: Tried a reinstall, didn't help...
Solved Edit: Yep, you're completely right I seem to have done some super-fast rebind without noticing. I also learnt that package manager will essentially never touch .config files as they're generated by the app and so aren't under the manager's jurisdiction. Solved!

CoqIDE key bindings and other preferences are stored in .coq/ or .config/coq. They are not deleted on uninstall and are shared if you have various versions of Coq installed at the same time (and this may be a problem).
If you are not worried about losing any specific preferences that you configured, I would advise to just delete this directory and let CoqIDE create it fresh again.
If you are worried, then just have a look at the files (quite long but also quite readable). For instance:
cat .config/coq/coqide.keys | grep "tab"
yields the following on my machine:
; (gtk_accel_path "<Actions>/View/Previous tab" "<Alt>Left")
; (gtk_accel_path "<Actions>/View/Next tab" "<Alt>Right")
PS: your problem might have arisen because key bindings are so easy to redefine in CoqIDE that you can do it without noticing: just open a menu (example: View), hover some option (for instance: Previous tab), type something on the keyboard (for instance v) and voilà v is now a shortcut for Previous tab.

Related

Strange key bindings (Ubuntu 16.04 VM, xfce, Spice console)

I have a Ubuntu 16.04.04 VM with xfce intalled. The VM is hosted by an academic HPC/cloud computing system (Compute Canada), and I access it through their website which I believe has a Spice console. I'm new to a lot of this so I'm happy I made it this far.
My problem is some very strange key bindings. For example,
when I try to type p in the Terminal it brings up the Display window and doesn't type p.
tab switches between windows and doesn't autocomplete.
I can't copy or paste. e.g. ctrl-v does nothing, and cmd-v acts as if I held the v key down ten seconds.
Occasionally I can't type anything, but this is usually fixed by refreshing the browser window.
The p, tab, and lack of copy-paste are the big problems. For example, in the picture above I can't complete the file name (.zip). This makes the VM practically unusable for what I'm doing. How do I solve this?
A partial answer to my own question: I changed the Application Shortcuts in the Setting menu.
Specifically, I typed xfce4-settings-manager to open Settings. There was an entry in the Command column (xfce-display-settings --minimal) that was bound to Super+P and I removed it. Fixed that at least!

Remap Sublime Keymap in EmacsProEssentials

The EmacsProEssentials Sublime Text 3 package has a bug in the keybindings:
{"keys": ["ctrl+\\"], "command": "undo"}
Undo is not ctrl+\ in Emacs it is ctrl+/.
The developer is aware of the issue, but I'd like to remap the key in the meantime.
How do I remap the key in a package in Sublime Text 3?
When Sublime loads package resource files, it loads similarly named files from all packages and combines them together. This is done in a specific order, and in that order the User package is always last so that your customizations take precedence.
So the easiest thing to do would be to just use Preferences > Key Bindings (this is under Sublime Text if you're on MacOS) and put the fixed binding in your custom key bindings.
Once you do that, your version of the binding will be active (as will the old one from the package), so things will work the way that you expect.
When the upstream author updates the package you can remove your customized binding, although presumably this is not vital if you're both going to make the same change.
The more involved version of the fix involves using PackageResourceViewer to find and open the packaged version of the sublime-keymap and modify it there, thus overriding it and fixing it at the source.
However if you do that, when the author updates the file your change will still take precedence without any notification otherwise, so you'll be effectively locking yourself into your modified version, which could conceivably cause troubles down the line.
You can mitigate that by also installing OverrideAudit, which will tell you when this sort of thing is happening, but fixing it in your User package is probably the better way regardless.

gVim in Ubuntu is slow when switching tabs or navigating lines

It's been like this forever really. Because I worked both on Ubuntu and Mac OS X interchangeably I didn't care as much. Now I think maybe it's time to finally find out what is wrong with it.
THE PROBLEM: When I switch tabs or navigate the lines with arrows or J, K keys and when I do it repeatedly (as if when trying to find the right tab holding Ctrl and hitting Tab) it seems to be delaying the action. When I stop hitting the keys gVim may still be finishing the operations (for instance, I stop hitting Ctrl+Tab, gVim may switch 5 more tabs - the number depends on how long I've been hitting Ctrl+Tab - before it stops).
MacVim with similar settings in .vimrc works just fine. The delays are present both when Compiz is turned off and turned on. Any ideas?
I have experienced similar sluggishness when working with large files. I've found that folded blocks makes it worse, so try and open all folds - zR.
This is a know bug in Ubuntu. Until it is patched in the official repositories, you can use this PPA repository, which contains a fixed version of Vim. I just tried it and it fixes the issue.

What could be causing Vim to switch keymaps randomly?

I've noticed a problem with Vim, where the keyboard mapping would unexpectantly change (to French I think, but I'm not sure). For example, the character 'É' appears when the key '?' is pressed.
My keyboard is set to English, and I don't have any other languages on my computer.
Restarting Vim fixes this problem temporarily, but the problem reappears after a while.
What could be causing this, and what can I do to fix it?
I found this blog post on the same problem. Apparently left-alt + shift will do it. Removing that from the Windows "Advanced Key Settings" dialog and/or removing all unwanted keymaps should fix the problem.
I am not on a Windows system at the moment so cannot verify this.
Update
I have tried it on a Windows system and can verify that this is the problem - alt+shift defaults to cycling through the all the keyboard configurations.
It can be changed from (deep breath...)
Control Panel -> Regional & Language Options -> Languages Tab -> Details button -> Key Settings -> Switch between input languages
Unselect both tickboxes on the final dialog.
I find it astonishing that anyone at Microsoft thought it would be a good idea to have a simple key combination that silently changes the keyboard mapping and other language settings, and only for the current program. How often has anyone wanted to do that?

Can't Copy & Paste in Eclipse 3.5

I recently updated my Eclipse to the latest release 3.5 and since then I have a very annoying problem with c&p using the shortcuts.
In an editor (xml, jsp, doesn't matter which one) I try to copy something and paste it somewhere else, nothing happens. When I cut out something and put it somewhere else I sometimes get something else (like a messed up part of my previous selection) or just some whitespaces. This gets even worse when I change lines in between.
First I thought that my keyboard is probably broken but it works just fine in other programs. Then I tried using the context menus' c&p and there it works. Yesterday I managed to get at least an error message when I tried to copy a file in the navigator from one project to another (the message was just "error using copy...bla". no details).
Does anyone else have this problem, or know how to solve it?
I am running on Kubuntu 9.04, and have quite some plugins installed (but only from the Galileo Updates Site), like Birt, Mylin, WST, or Subversive.
For my problem, I had to go to Window > Preferences > Java > Editor > Typing, and uncheck "Update imports"
This must be related to the key mapping, since those shortcuts are defined according to context.
(Column "When", in Preferences / General / Keys)
Check if those shortcuts do not work for any editor (do they work for Java editor?)
If they work for some editor, not for other, then some plugin settings must have re-affected them to another command.
This is caused by various X clipboard managers doing weird things with the clipboard. (bug report).
In XFCE the clipman applet was rolled in XFCE 4.8, and will be the source of these problems.
To fix this in XFCE - kill xfce4-settings-helper. You will need to use Settings Manager -> Session and Startup -> Session to kill it, as otherwise it may restart automatically.
To prevent this starting next time, you will need to remove it from your startup/login programs in Settings Manager > Session and Startup > Application Autostart.
Problem was solved with newer Eclipse releases. I think >= 3.6. Depending on your distribution there may be a (back)port of this (not on my Xubuntu 11.04) within the repositories.
So a tarball installation of Eclipse 4.0 works perfectly for me. Cut&Paste works and I am lucky that my plugins are compatible to 4.0.
Unfortunately Sublime Text has the same problems.
I read somewhere that in KDE maybe Klipper / "Klipper on the panel" conflicts with eclipse copy action.
It's a tool for clipboard history. Try to remove that! It may solve your problem :-/
For me the xfce4-settings-helper killing worked.
Workaround:
You can cut&paste from the compare view. So simply compare the un-copyable file (e.g., local history) with a different version and Control-C what you need there.
In the *.java editor page, right click and select open in text editor. Past your snippet there. Your Snippet will show in the *.java page'
I use Eclipse Kepler for PHP development. It's dumb I know.
None of the solutions suggested here has solved this source of frustration.
I can confirm the copy function works whether shortcut keys are bound or not. As I can copy from eclipse and paste into any other application. Except eclipse.
My solution. Accidental discovery: Eclipse Kepler will allow you to paste outside the php open and close tags and allow you to click and drag the highlighted block of content into into position.
Acceptable solution for small bits of code. Horribly crippling for larger development environments.
For Xming, this resolved the problem for me. In XLaunch uncheck Clipboard (clipboard manager) in the "Specify parameter settings" GUI form.

Resources