This commit is contained in:
buster%netscape.com 1999-03-10 19:49:43 +00:00
Родитель 709ac5c2c8
Коммит f436abdcd6
2 изменённых файлов: 22 добавлений и 2 удалений

Просмотреть файл

@ -147,7 +147,7 @@ nsTextEditorKeyListener::KeyDown(nsIDOMEvent* aKeyEvent)
case nsIDOMEvent::VK_RETURN:
// Need to implement creation of either <P> or <BR> nodes.
mEditor->InsertBreak(ctrlKey);
mEditor->InsertBreak();
break;
default:
{
@ -205,6 +205,16 @@ nsTextEditorKeyListener::ProcessShortCutKeys(nsIDOMEvent* aKeyEvent, PRBool& aPr
// XXX: please please please get these mappings from an external source!
switch (keyCode)
{
// XXX: hard-coded select all
case nsIDOMEvent::VK_A:
if (PR_TRUE==ctrlKey)
{
aProcessed=PR_TRUE;
if (mEditor)
mEditor->SelectAll();
}
break;
// XXX: hard-coded undo
case nsIDOMEvent::VK_Z:
if (PR_TRUE==ctrlKey)

Просмотреть файл

@ -147,7 +147,7 @@ nsTextEditorKeyListener::KeyDown(nsIDOMEvent* aKeyEvent)
case nsIDOMEvent::VK_RETURN:
// Need to implement creation of either <P> or <BR> nodes.
mEditor->InsertBreak(ctrlKey);
mEditor->InsertBreak();
break;
default:
{
@ -205,6 +205,16 @@ nsTextEditorKeyListener::ProcessShortCutKeys(nsIDOMEvent* aKeyEvent, PRBool& aPr
// XXX: please please please get these mappings from an external source!
switch (keyCode)
{
// XXX: hard-coded select all
case nsIDOMEvent::VK_A:
if (PR_TRUE==ctrlKey)
{
aProcessed=PR_TRUE;
if (mEditor)
mEditor->SelectAll();
}
break;
// XXX: hard-coded undo
case nsIDOMEvent::VK_Z:
if (PR_TRUE==ctrlKey)