Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin hijacks "b" key even when not playing #3

Closed
brandonb927 opened this issue Mar 20, 2014 · 11 comments
Closed

Plugin hijacks "b" key even when not playing #3

brandonb927 opened this issue Mar 20, 2014 · 11 comments

Comments

@brandonb927
Copy link

I was slightly irritated when I installed 12+ Atom plugins (almost at once) to find that my "b" key on my Macbook had been hijacked! I narrowed it down to "atom-2048" (which I might add has completely destroyed my productivity thus far, but I digress), so is there a way to remap the b key to Esc or something?It happens even when I'm not playing the game. I haven't looked into the config options for the plugin so pardon me if this is something obvious.

void-main added a commit that referenced this issue Mar 21, 2014
…ey got blocked and the code is not triggered.
@void-main
Copy link
Owner

Thanks @brandonb927, for the bug report! This is indeed a quite annoying bug and sorry I didn't notice it earlier. Apparently, I forgot to register the event as activationEvents, so even I did test in the command code, the game itself won't get activated, so the b is blocked until the game is loaded once. I've fixed it and published a new patch. Please try it out!

@rgbkrk
Copy link

rgbkrk commented Mar 21, 2014

I just freshly installed and if I load the game then go to "boss mode", I can't go back to typing.

@rgbkrk
Copy link

rgbkrk commented Mar 21, 2014

I'm all for hitting esc to make 2048 disappear, making sure to keep state. You could even serialize it to keep track of the game.

@brandonb927
Copy link
Author

I just reinstalled atom-2048, still not able to use the "b" key even after quitting and starting Atom itself. I even uninstalled and reinstalled the plugin. Is there a debugging log I can provide? I haven't been using Atom a tonne lately and I haven't kept up with its progress.

@void-main
Copy link
Owner

Sorry guys, I didn't do a through test before publishing the package. I'll try to fix it ASAP. Thanks for the report!

@christhekeele
Copy link

The latest release seemed to fix this for me. (And somehow I didn't need 'b' when coding yesterday. Bizzare.)

@void-main
Copy link
Owner

There you go guys, I've changed to escape key for boss-is-coming mode. I've used Command Palette to test if escape key is hijacked. And everything seems to work. So, please tell me know if there's still some weird behaviour. Frankly speaking, this is my first time to use CoffeeScript, so, forgive me if I've made some stupid mistakes. 🍼

@rgbkrk
Copy link

rgbkrk commented Mar 22, 2014

Frankly speaking, this is my first time to use CoffeeScript, so, forgive me if I've made some stupid mistakes. 🍼

Hey it's all good.

Probably good to check to make sure it doesn't hijack escape for the find window.

I actually tried changing the keymap so that it only worked when focused on atom-2048:

diff --git a/keymaps/atom-2048.cson b/keymaps/atom-2048.cson
index 201eb0e..b6aa0b7 100644
--- a/keymaps/atom-2048.cson
+++ b/keymaps/atom-2048.cson
@@ -8,6 +8,8 @@
 # For more detailed documentation see
 # https://atom.io/docs/latest/advanced/keymaps
 '.workspace':
-  'b': 'atom-2048:bossComing'
   'ctrl-alt-a': 'atom-2048:toggle'
   'ctrl-alt-b': 'atom-2048:bossAway'
+
+'.atom-2048':
+  'b': 'atom-2048:bossComing'

Doesn't seem like I ever get focus though. If it would have worked, I would have submitted a PR.

@void-main
Copy link
Owner

Same here, this was my initial try to fix this issue. I don't know why the element .atom-2048 never got focused. Then I have to turn to the workspace keybinding, which is quite unacceptable even for myself... But I didn't know how to fix this...

@brandonb927
Copy link
Author

Just installed the update, looks like its working great! Thanks so much for the support :)

Feel free to close this unless anyone else is still having issues.

@void-main
Copy link
Owner

Have fun and good luck!

🌝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants