remap

vim key mapping reference

旧城冷巷雨未停 提交于 2019-12-10 09:22:25
问题 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? 回答1: a vim principle is that an undocumented feature is a useless feature. So vim documentation is all you need. :help :map :help :map-special-keys 回答2: :help <> will give you info on the notation used with :map . The authors of vim

How to disable a built-in command in vim

核能气质少年 提交于 2019-12-10 03:56:10
问题 In vim, when I hit :wq it is almost always an accident that occurred when attempting to input :w . I would like to disable :wq . The closest I found is cmap , but it has some odd behavior. If I do something like :cmap wq w I can no longer even input :wq ; it just remaps the keystroke sequence wq to w in command mode. Now I cannot, for example, input a search/replace command on a string containing wq . I would just like to alias the exact command :wq to :w or a no-op. Is there a way to do this

Jumping from one firmware to another in MCU internal FLASH

落花浮王杯 提交于 2019-12-09 00:13:24
问题 I am currently working on a bootloader firmware application targeted to STM32F030C8. I specified in my scatter file that the bootloader app will occupy main memory location 0x08000000 to 0x08002FFF (sector 0 to sector 2). I also wrote a main firmware application that is stored from 0x08003000 to 0x0800C800. After downloading both firmware to the MCU internal FLASH, I lauched the main app from the bootloader using the code below: /************************************************************//*

Remap `fn` to left mouse button on OSX

强颜欢笑 提交于 2019-12-08 17:39:48
问题 I get bad tendinitis from clicking the mouse all day. In the past I used Karabiner to remap the fn key to simulate a left mouse button. However it doesn't work with Sierra. I tried to accomplish this in Cocoa, and it correctly performs mouse-down/up when I press and release fn . However it doesn't handle double-click / triple-click. Also when dragging, (e.g. dragging a window, or selecting some text) nothing happens visually until I key-up, whereupon it completes. How can I adapt my code to

Color Remapping - Matching target palette using a 3D grid?

孤街浪徒 提交于 2019-12-08 02:39:33
问题 Let's say I have color 'FOO', and it is stored in RGB format. I need to recolor 'FOO' so it matches the closest color in a list of colors. Doing this on the fly, couldn't I view the RGB values from each color as points on a 3D grid (r=x, g=y, b=z) and compute the distance between point 'FOO' vs the points from each color in the list? The closest point to 'FOO' would be the replacement color? 回答1: In theory, yes. In reality, computing the closest color is non-trivial if you want to do it well.

Vim remap in paste mode

浪尽此生 提交于 2019-12-08 01:18:04
问题 Is there a possibility to remap in paste mode. For example, I remapped jk to <ESC> in insert mode with inoremap jk <esc> , so I can easily exit normal mode. But when I'm in paste mode with :pastetoggle my remapping does not work anymore. I looked for the help with :help map-modes but could not find anything related to the paste mode. 回答1: From :help 'paste' : [...] When the 'paste' option is switched on (also when it was already on): - mapping in Insert mode and Command-line mode is disabled

Remap mouse-event to keyboard key

折月煮酒 提交于 2019-12-06 18:04:30
问题 I want to remap mouse-up and mouse-down to keyboard keys, but only while using a certain application. This is how far I got: _WinWaitActivate("League of Legends (TM) Client", "") HotKeySet("{K}", "WinTab") ProcessWait("") Func WinTab() Send("G") EndFunc #region --- Internal functions Au3Recorder Start --- Func _WinWaitActivate($title, $text, $timeout=0) WinWait($title, $text, $timeout) If Not WinActive($title, $text) Then WinActivate($title, $text) WinWaitActive($title, $text, $timeout)

Color Remapping - Matching target palette using a 3D grid?

不羁的心 提交于 2019-12-06 13:24:15
Let's say I have color 'FOO', and it is stored in RGB format. I need to recolor 'FOO' so it matches the closest color in a list of colors. Doing this on the fly, couldn't I view the RGB values from each color as points on a 3D grid (r=x, g=y, b=z) and compute the distance between point 'FOO' vs the points from each color in the list? The closest point to 'FOO' would be the replacement color? In theory, yes. In reality, computing the closest color is non-trivial if you want to do it well. Just for example, people's eyes are much more sensitive to changes in brightness than color shifts,

Python 2.7/OpenCV 3.3: Error in cv2.initUndistortRectifyMap . Not showing undistort rectified images

孤街醉人 提交于 2019-12-06 07:42:59
I want to distort and rectified my stereo images. For which I used Opencv 3.3 in Python 2.7. Code I used is : import cv2 import numpy as np cameraMatrixL = np.load('mtx_left.npy') distCoeffsL = np.load('dist_left.npy') cameraMatrixR = np.load('mtx_right.npy') distCoeffsR = np.load('dist_right.npy') R = np.load('R.npy') T = np.load('T.npy') imgleft = cv2.imread('D:\python\camera calibration and 3d const\left\left60.png',0) imgright = cv2.imread('D:\python\camera calibration and 3d const\Right/right60.png',0) R1,R2,P1,P2,Q,validPixROI1, validPixROI2 = cv2.stereoRectify(cameraMatrixL,distCoeffsL

How to remap keyboard key in c++ with LowLevelKeyboardProc?

两盒软妹~` 提交于 2019-12-05 18:53:23
I need to remap some of keys like Left Alt but i just disable it so code for disable Left Alt look like this: LRESULT CALLBACK LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam) { if (nCode == HC_ACTION) { KBDLLHOOKSTRUCT* p = (KBDLLHOOKSTRUCT*) lParam; if (p->vkCode == VK_LMENU) return 1; } return CallNextHookEx(hHook, nCode, wParam, lParam); } So I try to remap Left Alt to Left Ctrl and use function like keybd_event and SendMessageA but didn't get nothing. LRESULT CALLBACK LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam) { if (nCode == HC_ACTION) { KBDLLHOOKSTRUCT* p