key-bindings

WPF MVVM KeyBinding not being recognized right away and not always working

For whatever reason, the KeyBindings for my UserControl aren't working as soon as my WPF Application loads. They do work after I press a button on the form but not when I set focus to the form by clicking or alt tabbing or moving or anything like that. And when they do work my enter keys print a random number. (sometimes 5, sometimes 7 e...

Emacs: print key binding for a command or list all key bindings

In Emacs (GNU 23.2, *nix), how can I: list the key sequences bound to a particular command? For example, how can we list all the key sequences that execute save-buffers-kill-emacs, with the output of key sequences bound to it? Assuming we can do this, listing the key sequences bound to goto-line should print the output: M-g g on a de...

Emacs cheat sheet that lists equivalents to everyday vim commands

There were two things that I want to know how to do in Emacs (23.2, *nix): Go to the first character after indentation in a line Go to the first character that's the equivalent to a given character (an equivalent to vim's fx command that goes forward until it hits the x character; maybe C-s (incremental search) is the best way to do ...

How to set a key binding to make Emacs as transparent/opaque as I want?

I want to have a command in Emacs to make it as opaque/transparent as I want (refer to the fabulous question that pointed out that transparency is possible in Emacs, and the EmacsWiki page linked there which has the code I am using below). The EmacsWiki code sets "C-c t" to toggle the previously set transparency on and off: ;;(set-fram...

Using special keys for keybidings in Javascript

I was wondering if it was possible to use special keys that the macbook pro has for music control and bind them in javascript? Example keys: PLay/pause,next, back. I am trying to do this to modify a greasemonkey script if that helps. Here is the current code HotKeys.bindings['/'] = HotKeys.activateSearch; HotKeys.bindings['p'] = HotK...

Assign multiple Emacs keybindings to a single command?

I'm giving ErgoEmacs mode a try to see if I can use Emacs more comfortably. Some of its keybindings are fairly intuitive, but in many cases I don't want to outright replace the defaults. For example, in the context of ErgoEmacs' navigation shortcut structure, M-h makes sense as a replacement for C-a--but I want to be able to use both, n...

How do I bind <Print Screen> to a macro in emacs?

I would like to be able to hit <Print Screen> in emacs and trigger a commit in a git repository. My lisp is pretty rusty and know this is broken, but don't know where: ( defun tip-local-write nil "Write to store" ( interactive ) ( save-buffer ) ( change-directory "~/tip" ) ( shell-command "git commit -m checkpoint ." ) ...

KeyBinding on a TreeViewItem

I have a typical treeview and a viewmodel. The viewmodel has an observable collection of other viewmodels that serves as a data source for the tree. public class TreeViewVM { public ObservableCollection<ItemVM> Items { get; private set; } public ItemVM SelectedItem { get; set; } } and the ItemVM : public class ItemVM { ...

Key Mapping for ViPlugin for Eclipse

I want to duplicate some of my Vi key mappings in the ViPlugin for Eclipse. Specifically, I use "jj" for the Esc key, which is done like this in my rc file: map! jj <Esc> The ViPlugin User Manual explains how to set up some rc file type of configurations. The example given is: <?xml version="1.0"?> <xml> <shiftwidth>4</shiftwidth...

How do I get Emacs bindings in Textmate?

In Textmate: Power Editing for the Mac, the author says that Textmate has Emacs key bindings. When I try to use them in Textmate some work and some don't work. For example C-n moves the cursor down one line, but C-p runs some command that gives me weird output (it doesn't move up one line). Is there a way in Textmate to lookup what a ...

WPF: KeyBinding for Tab, Swallows Tab and Doesn't Pass It Along

I've got a textbox where I have this: <KeyBinding Command="{Binding MyCommand}" Key="Tab"/> Problem is it swallows the Tab and doesn't tab to the next control. How can I trap the Tab for the textbox and still preserve tabbing to the next control in the tab order? Edit: I'm also using MVVM and MyCommand is in the ViewModel code, so that...

Can I create a KeyBinding for a sequence of keys in WPF?

Is it possible to define key bindings in WPF for a sequence of key presses like the shortcuts in Visual Studio e.g. Ctrl+R, Ctrl+A is run all tests in current solution As far as I can see I can only bind single key combinations like Ctrl+S using the element. Can I bind sequences using this or will I have to manually handle the key pre...

List all Keybindings for a certain emacs mode.

I know that I can list all the keybidings avaliable in emacs by using C-h b, but is it possible to list only the keybindings that apply to a certain mode, say dired-mode. In dired+, I can do ? h and it shows me all the applicable dired mode keybindings. Thanks ...

KeyBinding without a command in WPF

I've a simple WPF app, and I'd like to add what is known in the Win32 world as keyboard accelerators. It looks like KeyBinding is the ticket, but it requires binding to a Command object. I'm not using command objects, nor do I want to. Is there another way to get an event triggered when a ctrl-x key sequence is hit? ...

.net mvc keybindings poster

Hi all, I've been looking for some asp.net mvc keybinding posters but can only seem to find ones for VS 2010 which dont include any MVC specific things. Is there any out there? Or what would be the easiest way to make one for myself? I'm using resharper as well but that also doesnt seem to have a specific poster for mvc. ...

vim key mapping reference

I've just installed the command-t plugin and what to map it to cmd-t instead of leader-t. I'm fairly new to vim and I don't know what the symbols are for the key mappings. Where can I find a reference for the symbols you use when mapping key combos in vim? ...

How do I list the defined keys in emacs isearch-mode?

How do I list the defined keys in emacs isearch-mode? Based on http://stackoverflow.com/questions/2845934/emacs-print-key-binding-for-a-command-or-list-all-key-bindings I have tried C-h m, but I cannot do that while in isearch-mode (C-h and M-x seem to cancel out of it) Thanks, -Shawn ...

How can I assign the 'Close on Escape-key press' behavior to all WPF windows within a project?

Is there any straightforward way of telling the whole WPF application to react to Escape key presses by attempting to close the currently focused widow? It is not a great bother to manually setup the command- and input bindings but I wonder if repeating this XAML in all windows is the most elegant approach? <Window.CommandBindings> ...

Winform->WPF MVVM Keybinding Error?

I need some assistance in getting WPF KeyBindings working when being called from a WinForm application. I've created what I think is the basic parts to demonstrate the problem. I can provide an sample application if that helps. The WinForm application starts a form which has a button that calls the WPF Private Sub Button1_Click(ByVal ...

Emacs Lisp Align Keybinding Definition in init file

I have the following line in my Emacs init file. (global-set-key (kbd "C-x a r") 'align-regexp) Is there any way to hard-code in a particular regex so that I don't have to specify it every time? ...