mirror of https://github.com/stella-emu/stella.git
added cut/copy/paste text support for Windows keys
This commit is contained in:
parent
76c526bcb0
commit
a021005b4e
|
@ -1883,9 +1883,9 @@
|
||||||
<tr><td>Control + w</td><td>Remove entire word to left of cursor</td></tr>
|
<tr><td>Control + w</td><td>Remove entire word to left of cursor</td></tr>
|
||||||
<tr><td>Control + Left</td><td>Move cursor to beginning of word to the left</td></tr>
|
<tr><td>Control + Left</td><td>Move cursor to beginning of word to the left</td></tr>
|
||||||
<tr><td>Control + Right</td><td>Move cursor to beginning of word to the right</td></tr>
|
<tr><td>Control + Right</td><td>Move cursor to beginning of word to the right</td></tr>
|
||||||
<tr><td>Control + c</td><td>Copy entire line to clipboard</td></tr>
|
<tr><td>Control + c, Control + Insert</td><td>Copy entire line to clipboard</td></tr>
|
||||||
<tr><td>Control + v</td><td>Paste clipboard contents</td></tr>
|
<tr><td>Control + v, Shift + Insert</td><td>Paste clipboard contents</td></tr>
|
||||||
<tr><td>Control + x</td><td>Cut entire line to clipboard</td></tr>
|
<tr><td>Control + x, Shift + Delete</td><td>Cut entire line to clipboard</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</blockquote></br>
|
</blockquote></br>
|
||||||
|
|
||||||
|
|
|
@ -337,7 +337,10 @@ bool PromptWidget::handleKeyDown(StellaKey key, StellaMod mod)
|
||||||
|
|
||||||
case KBDK_DELETE:
|
case KBDK_DELETE:
|
||||||
case KBDK_KP_PERIOD: // actually the num delete
|
case KBDK_KP_PERIOD: // actually the num delete
|
||||||
killChar(+1);
|
if(StellaModTest::isShift(mod))
|
||||||
|
textCut();
|
||||||
|
else
|
||||||
|
killChar(+1);
|
||||||
dirty = true;
|
dirty = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -444,6 +447,21 @@ bool PromptWidget::handleKeyDown(StellaKey key, StellaMod mod)
|
||||||
dirty = true;
|
dirty = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case KBDK_INSERT:
|
||||||
|
if(StellaModTest::isShift(mod))
|
||||||
|
{
|
||||||
|
textPaste();
|
||||||
|
dirty = true;
|
||||||
|
}
|
||||||
|
else if(StellaModTest::isControl(mod))
|
||||||
|
{
|
||||||
|
textCopy();
|
||||||
|
dirty = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
handled = false;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (StellaModTest::isControl(mod))
|
if (StellaModTest::isControl(mod))
|
||||||
{
|
{
|
||||||
|
|
|
@ -138,7 +138,13 @@ bool EditableWidget::handleKeyDown(StellaKey key, StellaMod mod)
|
||||||
|
|
||||||
case KBDK_DELETE:
|
case KBDK_DELETE:
|
||||||
case KBDK_KP_PERIOD:
|
case KBDK_KP_PERIOD:
|
||||||
dirty = killChar(+1);
|
if(StellaModTest::isShift(mod))
|
||||||
|
{
|
||||||
|
cutSelectedText();
|
||||||
|
dirty = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
dirty = killChar(+1);
|
||||||
if(dirty) sendCommand(EditableWidget::kChangedCmd, key, _id);
|
if(dirty) sendCommand(EditableWidget::kChangedCmd, key, _id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -164,6 +170,21 @@ bool EditableWidget::handleKeyDown(StellaKey key, StellaMod mod)
|
||||||
dirty = setCaretPos(int(_editString.size()));
|
dirty = setCaretPos(int(_editString.size()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case KBDK_INSERT:
|
||||||
|
if(StellaModTest::isControl(mod))
|
||||||
|
{
|
||||||
|
copySelectedText();
|
||||||
|
dirty = true;
|
||||||
|
}
|
||||||
|
else if(StellaModTest::isShift(mod))
|
||||||
|
{
|
||||||
|
pasteSelectedText();
|
||||||
|
dirty = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
handled = false;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (StellaModTest::isControl(mod))
|
if (StellaModTest::isControl(mod))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue