keymapping

reassign a new “character” to a key, so that it gets printed instead of the default letter for the key

此生再无相见时 提交于 2021-02-10 14:33:43
问题 I'm in the process of developing a text editor that has a "macro system," where the user can reassign values to the keys on their keyboard -- so that when they press the letter a, it might print the letter "z" instead. (Really, it'll be used for math symbols, not other letters). Can anyone get me started on the Java code to reassign a value to a key within a JTextPane? If you need more details, let me know. Thank you! So far, this is what I have: public void keyPressed(KeyEvent evt) { /

VSCode keyboard shortcuts for Android Studio

好久不见. 提交于 2020-08-24 06:33:31
问题 Is there a way to add VSCode as an option under Android Studio's keymap settings? Under File -> Settings... -> Keymap There are many other options listed, however none of them are even similar to VSCode 回答1: I was unable to find anybody else who had done this, so I created my own https://github.com/meadowsjared/VSCode-keybindings-for-Android-Studio If you click the GitHub link above, it includes both instructions and you can also download the jar file you'll need (just hit Clone or download )

Is there a command for “Show Invisibles” in Atom?

↘锁芯ラ 提交于 2020-07-04 06:23:32
问题 Is there a command available to key mapping for toggling the display of invisibles in the Atom editor. A Show/Hide Invisibles command? Where would I go to look for such a command? 回答1: YES For Linux and Windows: 1) hit Ctrl + Shift + P and type keymap 2) select Application: open your keymap and add the following 2 lines to that file: 'body': 'shift-ctrl-i': 'window:toggle-invisibles' Or any non-conflicting keystroke combination of your liking instead of shift-ctrl-i . Note For further detail,

How can I configure Ctrl+PgUp and Ctrl+PgDown keybindings in vscode navigate to the top/bottom of the view instead of switching tabs?

旧时模样 提交于 2020-01-25 07:40:06
问题 By default, Ctrl+PageUp and Ctrl+PageDown combinations in Visual Studio Code switch view to the next/previous tab. I would like to reconfigure them so they work like in Visual Studio, so they navigate to the top/bottom of the screen. I am trying to modify the editor's keybindings (keybindings.json) but I find myself unable to find proper commands. So far, I have found: cursorTop/cursorBottom - moves cursor to the top/bottom of the whole file scrollLineUp/scrollLineDown - scrolls the view, but

Windows 7 Map CTRL + j to the Down Arrow Key

泪湿孤枕 提交于 2020-01-22 15:38:28
问题 I have been searching for months for a way to map a key combination ( CTRL + something ) to a directional key (like down or up). I desperately want in Visual Studio to be able to press CTRL + j and have the cursor move down a line. I hate having to move my hands off of the home row to move up and down for things like intellisense or even just navigating up and down lines. Does anyone have a solution for this? I would be ok with a Visual Studio-only solution, but something that works at the OS

Remap Caps lock key to Esc in Mma 7

倾然丶 夕夏残阳落幕 提交于 2020-01-01 02:10:56
问题 TLDR : How do I get CapsLock to translate to "ShortNameDelimiter" in Mma 7? I like pretty text in my mma notebooks, and often define functions as f[\[Alpha]_] =... so as to match the exact equation that I'm working with. As such, it involves a lot of Esc - letter - Esc sequences, and reaching for Esc every other stroke breaks my flow of typing. Now, the CapsLock key is seldom used (I can't remember the last time I needed it), but conveniently placed (your pinky is right there!). Remapping it

Keyboard Input with swing Java

为君一笑 提交于 2019-12-31 02:15:13
问题 I am working a calculator using java swing and I want to be able to enter the numbers and operations via keyboard. I can't seem to get it working. import java.awt.*; import javax.swing.*; import java.awt.event.*; public class Calculator extends JFrame implements ActionListener { JPanel[] row = new JPanel[6]; JButton[] button = new JButton[23]; JMenuBar menubar = new JMenuBar(); JMenu file = new JMenu("File"); JMenuItem clear = new JMenuItem("Clear"); JMenuItem exit = new JMenuItem("Exit");

qt setting QWSServer keymap from code

青春壹個敷衍的年華 提交于 2019-12-25 02:18:09
问题 I need to a keymap for my embedded QWSServer application. Using environmental variables like this QWS_KEYBOARD="TTY:keymap=/german_keyboard.qmap" export QWS_KEYBOARD works, but isn't optimal for me. I tried to set it from code using QWSServer* wsServer = QWSServer::instance(); QWSKeyboardHandler * kh = QKbdDriverFactory::create("TTY", "keymap=/german_keymap.qmap"); wsServer->setKeyboardHandler(kh); as mentioned here. However, it is not working. Any ideas how to fix it? 回答1: It actually looks

Change “Next File” and “Previous File” shortcut in Sublime Text 2

◇◆丶佛笑我妖孽 提交于 2019-12-22 04:29:08
问题 I'm having no luck changing the key bindings for switching files in Sublime. Does anybody know that the deal is here? All i'm trying to achieve is cmd+] and cmd+[ to show next and previous files. Then i can use tab and shift+tab for all my indenting. [ { "keys": ["super+]"], "command": "Next File" }, { "keys": ["super+["], "command": "Previous File" } ] Thanks everyone! 回答1: Try this: [ { "keys": ["ctrl+]"], "command": "next_view" }, { "keys": ["ctrl+["], "command": "prev_view" } ] Of course

Atom/Sublime like Multiple selections in Jupyter

隐身守侯 提交于 2019-12-21 07:39:09
问题 How can I select matching keywords in a Jupyter notebook via a keyboard shortcut? For example, in the Atom/Sublime editor I can hit cmd + D on a mac (or Ctrl + d on Windows) while the cursor is over 'var' and each time I do that the next 'var' will be highlighted. I can then type the new variable name and 'var' is replaced with whatever I typed. var = "hello" print(var) print(var) Is there an equivalent in a Jupyter notebook? 回答1: Add custom.js to C:\Users\username\.jupyter\custom # for