Minor cleanup and a small fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12061 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1402,16 +1402,17 @@ void RootLayer::KeyboardEventHandler(int32 code, BPortLink& msg)
|
|||||||
{
|
{
|
||||||
BMessage keymsg(B_KEY_DOWN);
|
BMessage keymsg(B_KEY_DOWN);
|
||||||
keymsg.AddInt64("when", time);
|
keymsg.AddInt64("when", time);
|
||||||
keymsg.AddInt32("modifiers",modifiers);
|
|
||||||
keymsg.AddInt32("key", scancode);
|
keymsg.AddInt32("key", scancode);
|
||||||
|
|
||||||
if(repeatcount > 1)
|
if(repeatcount > 1)
|
||||||
keymsg.AddInt32("be:key_repeat", repeatcount);
|
keymsg.AddInt32("be:key_repeat", repeatcount);
|
||||||
keymsg.AddData("states",B_INT8_TYPE,keystates,sizeof(int8)*16);
|
|
||||||
for(uint8 i=0;i<4; i++)
|
keymsg.AddInt32("modifiers", modifiers);
|
||||||
{
|
keymsg.AddData("states", B_UINT8_TYPE, keystates, sizeof(int8) * 16);
|
||||||
if(utf[i])
|
|
||||||
|
for (uint8 i = 0; i < 3; i++)
|
||||||
keymsg.AddInt8("byte", utf[i]);
|
keymsg.AddInt8("byte", utf[i]);
|
||||||
}
|
|
||||||
keymsg.AddString("bytes", string);
|
keymsg.AddString("bytes", string);
|
||||||
keymsg.AddInt32("raw_char", raw_char);
|
keymsg.AddInt32("raw_char", raw_char);
|
||||||
|
|
||||||
@@ -1491,12 +1492,12 @@ void RootLayer::KeyboardEventHandler(int32 code, BPortLink& msg)
|
|||||||
keymsg.AddInt64("when", time);
|
keymsg.AddInt64("when", time);
|
||||||
keymsg.AddInt32("key", scancode);
|
keymsg.AddInt32("key", scancode);
|
||||||
keymsg.AddInt32("modifiers", modifiers);
|
keymsg.AddInt32("modifiers", modifiers);
|
||||||
keymsg.AddData("states",B_INT8_TYPE,keystates,sizeof(int8)*16);
|
keymsg.AddData("states", B_UINT8_TYPE, keystates, sizeof(int8) * 16);
|
||||||
for(uint8 i=0;i<4; i++)
|
|
||||||
{
|
for(uint8 i = 0; i < 3; i++) {
|
||||||
if(utf[i])
|
|
||||||
keymsg.AddInt8("byte", utf[i]);
|
keymsg.AddInt8("byte", utf[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
keymsg.AddString("bytes", string);
|
keymsg.AddString("bytes", string);
|
||||||
keymsg.AddInt32("raw_char", raw_char);
|
keymsg.AddInt32("raw_char", raw_char);
|
||||||
|
|
||||||
@@ -1536,7 +1537,7 @@ void RootLayer::KeyboardEventHandler(int32 code, BPortLink& msg)
|
|||||||
keymsg.AddInt64("when", time);
|
keymsg.AddInt64("when", time);
|
||||||
keymsg.AddInt32("key", scancode);
|
keymsg.AddInt32("key", scancode);
|
||||||
keymsg.AddInt32("modifiers", modifiers);
|
keymsg.AddInt32("modifiers", modifiers);
|
||||||
keymsg.AddData("states",B_INT8_TYPE,keystates,sizeof(int8)*16);
|
keymsg.AddData("states", B_UINT8_TYPE, keystates, sizeof(int8) * 16);
|
||||||
|
|
||||||
win->SendMessageToClient(&keymsg);
|
win->SendMessageToClient(&keymsg);
|
||||||
}
|
}
|
||||||
@@ -1572,7 +1573,7 @@ void RootLayer::KeyboardEventHandler(int32 code, BPortLink& msg)
|
|||||||
keymsg.AddInt64("when", time);
|
keymsg.AddInt64("when", time);
|
||||||
keymsg.AddInt32("key", scancode);
|
keymsg.AddInt32("key", scancode);
|
||||||
keymsg.AddInt32("modifiers", modifiers);
|
keymsg.AddInt32("modifiers", modifiers);
|
||||||
keymsg.AddData("states",B_INT8_TYPE,keystates,sizeof(int8)*16);
|
keymsg.AddData("states", B_UINT8_TYPE, keystates, sizeof(int8) * 16);
|
||||||
|
|
||||||
win->SendMessageToClient(&keymsg);
|
win->SendMessageToClient(&keymsg);
|
||||||
}
|
}
|
||||||
@@ -1606,7 +1607,7 @@ void RootLayer::KeyboardEventHandler(int32 code, BPortLink& msg)
|
|||||||
keymsg.AddInt64("when", time);
|
keymsg.AddInt64("when", time);
|
||||||
keymsg.AddInt32("modifiers", modifiers);
|
keymsg.AddInt32("modifiers", modifiers);
|
||||||
keymsg.AddInt32("be:old_modifiers", oldmodifiers);
|
keymsg.AddInt32("be:old_modifiers", oldmodifiers);
|
||||||
keymsg.AddData("states",B_INT8_TYPE,keystates,sizeof(int8)*16);
|
keymsg.AddData("states", B_UINT8_TYPE, keystates, sizeof(int8) * 16);
|
||||||
|
|
||||||
win->SendMessageToClient(&keymsg);
|
win->SendMessageToClient(&keymsg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user