adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.26k stars 7.63k forks source link

Ctrl-S not working #9588

Open TKoebel opened 9 years ago

TKoebel commented 9 years ago

I've just started using Brackets and I'm really enjoying it, the problem that I'm having is that the Ctrl-S shortcut to save a file isn't working.

Any other Save shortcut works (Save All, Saves As...), but when I press Ctrl-S to simply save the file, nothing happens. I've tried testing with no extensions loaded with no change and no errors are logged.

Version: Release 0.44 experimental build 0.44.0-14876 (release 6d2d33d80) OS: Win7 64bit

peterflynn commented 9 years ago

@TKoebel Are you saving a file that already exists, or a new untitled file that doesn't exist yet? If it's a file that already exists, does the file have any unsaved changes?

Here's also something you can try:

  1. Select Debug > Show Developer Tools
  2. Look in the Console tab -- do any errors appear when you hit Save?
  3. If not, click the Sources tab, press Ctrl-O, and open DocumentCommandHandlers.js
  4. Find the handleFileSave() function, and click in the gutter to add a breakpoint inside that function
  5. Try to save again -- does it pause at the breakpoint? If so, what is the value of doc once you get to the first if statement?
TKoebel commented 9 years ago

@peterflynn I'm saving an existing file with unsaved changes.

I've followed the steps you've outlined, but get no response when I press Ctrl-S in Brackets. To make sure that I was doing it correctly, I added a breakpoint in the handleFileSaveAll() function, which did pause when I pressed Ctrl-Alt-S.

It seems as though Brackets isn't registering the Ctrl-S keypress, for some reason.

RaymondLim commented 9 years ago

@TKoebel By any chance, are you using a non-US keyboard layout? Do you see Ctrl+S shortcut listed under FIle > Save?

TKoebel commented 9 years ago

@RaymondLim I'm using a US keyboard and the Ctrl+S shortcut is listed under File > Save. As I said, the other two save options work with their shortcuts, just Ctrl+S doesn't work.

pthiess commented 9 years ago

@TKoebel please try the following: Start by using Debug > Reload Without Extensions to verify that this is not being caused by an extension.

Do you still see the problem?

TKoebel commented 9 years ago

@pthiess I've already tried that and still get no response.

cannadi commented 9 years ago

I have the same problem in a mac, hitting cmd+s sometimes do not save.

marcelgerber commented 9 years ago

Maybe related: #10329

RaymondLim commented 9 years ago

@cannadi Your issue may belong to #10329 since you're on Mac. Are you using Chinese IME?

peterflynn commented 9 years ago

@TKoebel On Windows, make sure you're not using Debug > New Brackets Window. It will break shortcuts and has several other even more serious bugs (see #8135), so I would recommend avoiding it.

Let me know if you're still seeing this and you're sure you're not using the New Window command.

MarcPennings commented 9 years ago

Hi @TKoebel

I just got fed up with CTRL-S not working on my PC also. After some digging and trying, I found that Skype had 'hijacked' CTRL-S. So as long as Skype was started, even if only in the background, it absorbed the key press and nothing obvious seemed to happen.

To reset: Skype / Tools / Options / Advanced / Hotkeys / Uncheck "Take a snapshot during video calls"

Hope this helps you! //Marc

PaulHen commented 8 years ago

Thank you MarcPennings. I too had this pesky Ctrl-S issue crop up in Word and in Irfanview. I had heard others report the problem in Excel. It seems to be a case of poor programming, 'allowing' code to 'escape' outside its own application.

vasylmeister commented 8 years ago

Big thank you Marc for your help. I was about to start messing with Registry, but luckily I found your post. I had this Skype hotkey on earlier, but didn't have any problems, so I suppose the issue is in one of the latest updates. Anyway I notified the Skype about it so they hopefully fix it and nobody freaks out about this anymore.