I really apologize for the confusion. <br><br>As per MinRK, the actual fix is updating CodeMirror and have nothing to do with the commit.<br>My mistake. I also had an updated version of CodeMirror. And I'd guess browser cache was messing my tests.<br>
<br>Dmitry<br><br><br>Just in case, here are the steps to fix the issue:<br>==== Under root: ====<br>cd ipython-0.13-py2.7.egg/IPython/frontend/html/notebook/static <br>mv codemirror codemirror.orig<br>wget <a href="http://codemirror.net/codemirror.zip">http://codemirror.net/codemirror.zip</a><br>
unzip codemirror.zip<br>mv CodeMirror-2.3 codemirror<br><br>Update codemirror/mode/python/python.js as per codemirror.orig/README-IPython.rst.<br> (it is a one-line change, add `\\?` to the end of singleOperators definition at line 8 chr 62)<br>
==================<br><br><br><div class="gmail_quote">On Sat, Jul 14, 2012 at 4:02 PM, MinRK <span dir="ltr"><<a href="mailto:benjaminrk@gmail.com" target="_blank">benjaminrk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Sat, Jul 14, 2012 at 3:20 PM, Dmitry Chichkov <<a href="mailto:dchichkov@gmail.com">dchichkov@gmail.com</a>> wrote:<br>
> Yes, actually, one that works for me is 'return false':<br>
><br>
><br>
> else if (event.which === key.SHIFT) {<br>
> // ignore shift keydown<br>
> return false;<br>
> }<br>
><br>
> I was trying out 'commenting out' version after I've found that return false<br>
> worked. And working version was still in the browser cache. Regarding<br>
> "ctrl+m-shift+<key>" - I don't use it. So, I don't know, if returning false<br>
> breaks it or not.<br>
<br>
</div>Okay, thanks. `return false` is fine for the existing case, the only<br>
important thing is that it returns without resetting the control_key<br>
state, so it sounds like that is the right fix.<br>
<span class="HOEnZb"><font color="#888888"><br>
-MinRK<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> Dmitry<br>
><br>
><br>
> On Sat, Jul 14, 2012 at 11:52 AM, MinRK <<a href="mailto:benjaminrk@gmail.com">benjaminrk@gmail.com</a>> wrote:<br>
>><br>
>> I commented this out, and shift-ins paste still doesn't work for me.<br>
>> I also don't see how this would be any different, as the same event<br>
>> will just skip all the following handlers, and return True at the end<br>
>> of the function (after restoring control_key_active=false, which is<br>
>> the behavior this is meant to avoid).<br>
>><br>
>> Of course, commenting it out is obviously the wrong answer, as that<br>
>> necessarily re-breaks the thing that commit fixed<br>
>> (ctrl+m-shift+<key>). What should the real event be? Should it<br>
>> return False?<br>
>><br>
>> On Sat, Jul 14, 2012 at 7:03 AM, klo uo <<a href="mailto:klonuo@gmail.com">klonuo@gmail.com</a>> wrote:<br>
>> > Great Dmirty, I already reported the issue also on github<br>
>> > <a href="https://github.com/ipython/ipython/issues/2113" target="_blank">https://github.com/ipython/ipython/issues/2113</a> but someone tagged it<br>
>> > as feature request instead bug<br>
>> ><br>
>> > Are you saying that by commenting that line everything works as<br>
>> > expected and it does not affect Notebook in any way?<br>
>> ><br>
>> ><br>
>> > On Fri, Jul 13, 2012 at 9:51 PM, Dmitry Chichkov <<a href="mailto:dchichkov@gmail.com">dchichkov@gmail.com</a>><br>
>> > wrote:<br>
>> >> It looks like broken "Shift-Ins" paste in Notebook is have something to<br>
>> >> do<br>
>> >> with the following code in the<br>
>> >> IPython/frontend/html/notebook/static/js/notebook.js :<br>
>> >><br>
>> >> else if (event.which === key.SHIFT) {<br>
>> >> // ignore shift keydown<br>
>> >> return true;<br>
>> >> }<br>
>> >><br>
>> >> If I'm commenting it out, shift-insert paste starts working again.<br>
>> >><br>
>> >> It looks like this code was introduced in the following commit 8dc3ac7<br>
>> >> -<br>
>> >> "prevented case-sensitive shortcuts if shift was pressed after control<br>
>> >> key:<br>
>> >><br>
>> >> <a href="https://github.com/ipython/ipython/commit/8dc3ac7c3961a5486aeb8552d772e7be45c6128f" target="_blank">https://github.com/ipython/ipython/commit/8dc3ac7c3961a5486aeb8552d772e7be45c6128f</a><br>
>> >><br>
>> >><br>
>> >> Dmitry<br>
>> >><br>
>> >><br>
>> >>> Don't know what OS you run, but FYI Alt-Enter doesn't seem to do<br>
>> >>> anything on Windows in both Firefox and Chrome.<br>
>> >>> >From the user point of view, your suggestion for executing and<br>
>> >>> appending new cell in one shortcut, looks interesting to me<br>
>> >>><br>
>> >>> While here, I don't want to steal your topic, but as I opened it<br>
>> >>> because you mentioned modifiers, I noticed strange behavior and I'm<br>
>> >>> not sure if it's the way it should be: CUI clipboard commands, which<br>
>> >>> are handy in Notebook environment, behave like this on my PC:<br>
>> >>><br>
>> >>> - Ctrl-Ins (Copy) - copies selection to clipboard (as expected)<br>
>> >>> - Shift-Del (Cut) - deletes selection (can be easily mistaken that<br>
>> >>> contents is cut to clipboard)<br>
>> >>> - Shift-Ins (Paste) - doesn't paste but triggers Insert<br>
>> >>><br>
>> >>> so it looks like some changes to Shift modifier has something to do<br>
>> >>> with this unfortunate behavior.<br>
>> >>><br>
>> >>><br>
>> >>> On Mon, Jul 2, 2012 at 7:30 PM, Zoltán Vörös <<a href="mailto:zvoros@gmail.com">zvoros@gmail.com</a>> wrote:<br>
>> >>> > Hi All,<br>
>> >>> ><br>
>> >>> > I know that since the notebook is supported on many platforms and on<br>
>> >>> > many browsers, the intersection of the many sets containing<br>
>> >>> > modifiers is<br>
>> >>> > somewhat limited, so I would like to ask, whether something like<br>
>> >>> > Alt+Enter would work on all systems. What I would like to suggest (I<br>
>> >>> > can<br>
>> >>> > also implement it, if I am given the go-ahead) is a shortcut for<br>
>> >>> > Shift+Enter + Control-m a. Many a time, I find myself going back to<br>
>> >>> > a<br>
>> >>> > piece of code in the middle of the notebook, and after entering a<br>
>> >>> > statement, I would like to get a new code cell at that particular<br>
>> >>> > place.<br>
>> >>> > Control+Enter takes me back to the cell, and Shift+Enter jumps to<br>
>> >>> > the<br>
>> >>> > next cell. I think, such an addition would be useful, but I don't<br>
>> >>> > know<br>
>> >>> > what the allowed modifiers are.<br>
>> >>> ><br>
>> >>> > Any comments or suggestions?<br>
>> >>> ><br>
>> >>> > Cheers,<br>
>> >>> > Zoltán<br>
>> >>> > _______________________________________________<br>
>> >>> > IPython-dev mailing list<br>
>> >>> > <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
>> >>> > <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
>> >><br>
>> >><br>
>> >><br>
>> >><br>
>> >> _______________________________________________<br>
>> >> IPython-dev mailing list<br>
>> >> <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
>> >> <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
>> >><br>
>> > _______________________________________________<br>
>> > IPython-dev mailing list<br>
>> > <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
>> > <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
>> _______________________________________________<br>
>> IPython-dev mailing list<br>
>> <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
>> <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> IPython-dev mailing list<br>
> <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
> <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
><br>
_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
</div></div></blockquote></div><br>