How to set the Meta key as key shortcut for something else than Application Launcher ? For example on toggle present windows (all desktops) ?
I have something similar to your problem: I want to disable opening Application Launcher via Meta key (this too annoying for me).
Disable it with next:
kwriteconfig5 --file kwinrc --group ModifierOnlyShortcuts --key Meta ""
Related
Brand new to Atom. I see that I can force some html tags to close inline using the autoclose-html package. However, when I populate the list with tags to close inline, they are still closing on a separate line. How should the list be formatted? I see the defaults as
default: ['title', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6']
And so I first tried adding ...'p', 'span'] to the list, and it did not work. I then found a list in autoclose-html.coffee and added the same, to no avail. What am I doing wrong?
The way I did this (Mac OS - should be same for other OS's):
Bring up Atom Settings (Atom menu --> Preferences)
Select Packages
Select autoclose-html Settings
Select View Code
Expand the lib folder
Select configuration.coffee
Make your changes in there and save the file.
Restart Atom
All done!
I don't know whether you have fix this issue. I just work it out.
It's nothing about this package, it's handled by atom's html-language plugin. Just open Atom->Snippets and add the following codes:
Sorry the preview looks terrible when I post the code as text. So I post a image here.
I'm trying to write an automated test that will automate the process of updating a google chrome extension. I'm not aware of another method of doing this automatically so here is what I'm currently trying to do:
Open the chrome extensions page (as far as I'm aware this is just an html page unless I'm missing something).
Click on the "Update extensions" button
Here is what I have tried having opened the chrome extensions page:
IwebElement UpdateButton = driver.findelement(By.Id("update-extensions-now"));
UpdateButton.Click();
For some reason the button click is not registering. I have tried some other locators such as CSS path and Xpath but they don't work either. Also, when I debug this test, it passes fine so I know it's not an issue with any of my locators. I have (as a test) tried to automate clicks on the other elements on this page and it's the same issue. I can't get a handle on any elements on the chrome://extensions page at all.
Has anyone encountered this or have any ideas as to what's going on?
You can use the Chrome extensions API to auto-update required extension.
Find the file "manifest.json" in the default Google Chrome
C:\Users\*UserName*\AppData\Local\Google\Chrome\User Data\Default\Extensions
There find the update URL of your extension:
{
"name": "My extension",
...
"update_url": "http://myhost.com/mytestextension/updates.xml",
...
}
The returned XML by the Google server looks like:
<?xml version='1.0' encoding='UTF-8'?>
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
<app appid='yourAppID'>
<updatecheck codebase='http://myhost.com/mytestextension/mte_v2.crx' version='2.0' />
</app>
</gupdate>
appid
The extension or app ID, generated based on a hash of the public key, as described in Packaging. You can find the ID of an extension or Chrome App by going to the Extensions page (chrome://extensions).
codebase
A URL to the .crx file.
version
Used by the client to determine whether it should download the .crx file specified by codebase. It should match the value of "version" in the .crx file's manifest.json file.
The update manifest XML file may contain information about multiple extensions by including multiple elements.
Another option is to use the --extensions-update-frequency command-line flag to set a more frequent interval in seconds. For example, to make checks run every 45 seconds, run Google Chrome like this:
chrome.exe --extensions-update-frequency=45
Note that this affects checks for all installed extensions and apps, so consider the bandwidth and server load implications of this. You may want to temporarily uninstall all but the one you are testing with, and should not run with this option turned on during normal browser usage.
The request to update each individual extension would be:
http://test.com/extension_updates.php?x=id%3DyourAppID%26v%3D1.1
You can find even more detailed information on exntesions developers site: https://developer.chrome.com/extensions
If you look at the HTML of the "chrome://extensions" page you will notice that the "Update extensions now" button is contained within an iframe. You need to switch to the iframe before trying to register a button click. i.e:
(This is in c#. Note that this code is written from memory so it may not be 100% accurate. Also, you will want to write more robust method. This code just quickly demonstrates that by switching to the iframe, it will work ok)
String ChromeExtensionsPage = "chrome://extensions";
driver.Navigate().GoToUrl(ChromeExtensionsPage);
driver.Switchto().Frame("DesiredFrame");
IwebElement UpdateButton = driver.findelement(By.Id("DesiredButtonID"));
UpdateButton.Click();
In Textmate there is a great shortcut to get to the context menu without using the mouse (I wish it worked systemwide!!!). It is Opt+F2.
When working on my Macbook, however, F2 is mapped to screen brightness, so I have to press fn+opt+F2, for which I have to use both hands - and that's quite uncomfortable.
Is the a way how I could map it to the right opt key, for example?
For TextMate 2 you can create ~/Library/Application Support/TextMate/KeyBindings.dict and let it contain something like:
{ "#d" = "showContextMenu:"; }
Here #d corresponds to ⌘D. See this blog post on how to construct the key equivalent strings.
Source: TextMate mailing list
Key binding files are read in the following order. A new binding for a bound key overrides the previous one:
/System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict
/Library/KeyBindings/DefaultKeyBinding.dict
~/Library/KeyBindings/DefaultKeyBinding.dict
/path/to/TextMate.app/Contents/Resources/KeyBindings.dict
~/Library/Application Support/TextMate/KeyBindings.dict
A relaunch of TextMate (⌃⌘Q) is required before changes take effect.
I have a habit of hitting CTRL+T to open a new tab in ST2. However this invokes the transpose function. I could map the new_file command to CTRL+T, but is it possible to disable the command completely via user keymap file. My search suggested adding this to user keymap.
[ { "keys": ["ctrl+t"], "command": "unbound" } ]
Is the "unbound" an officially endorsed way of disabling a shortcut?
{ "keys": ["ctrl+-"], "command": "noop" }
Binding a key to a no-operation or anything which wouldn't carry a command behavior, such as "hello", should work.
This would also keep the body of the binding if you change your mind in the future.
I have never see or read any official documentation about the unbound command, but it works. Another option would be removing the command attribute.
{ "keys": ["ctrl+t"] }
This will also unbound a key binding.
Also, if you're looking to undo a shortcut that was overridden by a plugin (I'm looking at you, "Terminal"):
find your previous shortcut in Preferences -> Key Bindings (Default)
Copy the line (e.g. { "keys": ["super+shift+t"], "command": "reopen_last_file" })
Open Preferences -> Key Bindings (User)
Add the the line in there (if the file is empty, it add [ and ] before the line, since it's an array of commands)
Actually this post did help me with my issue when using ST3 on mac. Using the Package Resource Viewer you can edit the default keyboard shortcuts (Default (OSX).sublime-keymap) and delete the lines that you don't want. After doing that ST3 will no longer capture your system-wide hotkeys.
The Path Tools package includes key bindings that override default Sublime key bindings which I use often, specifically: command+shift+V
On a Mac, I was able to override all of the default bindings of the Path Tools package by placing a blank file here:
~/Library/Application Support/Sublime Text 3/Packages/Path Tools/Default (OSX).sublime-keymap
I wish Sublime package installation warned users when a package includes key-bindings which will override current or default key bindings.
It is possible to overwrite the default bindings of installed packages by creating a custom default bindings file.
For example I want ctrl-T to transpose, so I have modified default bindings for CTags:
Copy c:\Users\USER\appdata\Roaming\Sublime Text 3\Installed Packages\CTags.CTags.sublime-package to tmp.zip
From the zip file extract Default.sublime-keymap to c:\Users\USER\appdata\Roaming\Sublime Text 3\Packages\CTags\
Modify or remove the binding from this file.
If the package is updated the custom default binding file is kept, so your bindings are kept and any new bindings will have to be updated manually.
I am unable to get an XMLHttpRequest object to work correctly in a Dashboard widget I am writing. I've isolated it to a trivial example not working in the global scope of the main.js file:
xhr = new XMLHttpRequest;
xhr.open( 'GET', "http://google.com", false );
xhr.send('');
When the last line is executed I get the error "ABORT_ERR: XMLHttpRequest Exception 102" (this is in the Dashcode debugger).
Does anyone have any idea what could be wrong here?
You need to select "Allow Network Access" in the "Widget Attributes" pane.
OK, I've found it (three hours): you need to add the following key to the Info.plist file:
<key>AllowNetworkAccess</key>
<true/>
I've got the same trouble unresolved even after AllowNetworkAccess were added to my info.plist. I've tried to change this key to AllowFullAccess, but nothing changed. After system reboot it worked fine o_O
The steps to take are:
From the menu, choose "Dashcode > Preferences..." and click on the Destinations tab.
Below the left column, click on the plus sign to create a new destination.
For an external website, choose FTP in the Type drop down. Fill out the Server, Path, User name and Password. Close the Preferences pane.
Back in Dashcode, click on the Widget Attributes icon in the left column.
Check the boxes of Allow network Access and Allow External File Access in the main column.
You should be able to run the widget without the 102 Exception error (if you are online)