diff --git a/indra/llwindow/llkeyboardmacosx.cpp b/indra/llwindow/llkeyboardmacosx.cpp
index bcc4e761451235ff9e62d6fc3b1bf77401c346cc..bf4aaaa905f98f492c34a75ed06b783be102af8b 100644
--- a/indra/llwindow/llkeyboardmacosx.cpp
+++ b/indra/llwindow/llkeyboardmacosx.cpp
@@ -133,8 +133,7 @@ LLKeyboardMacOSX::LLKeyboardMacOSX()
 	mTranslateKeyMap[0x7e] = KEY_UP;
 
 	// Build inverse map
-	std::map<U32, KEY>::iterator iter;
-	for (iter = mTranslateKeyMap.begin(); iter != mTranslateKeyMap.end(); iter++)
+	for (auto iter = mTranslateKeyMap.begin(); iter != mTranslateKeyMap.end(); iter++)
 	{
 		mInvTranslateKeyMap[iter->second] = iter->first;
 	}
@@ -154,7 +153,7 @@ LLKeyboardMacOSX::LLKeyboardMacOSX()
 	mTranslateNumpadMap[0x4c] = KEY_PAD_RETURN;	// keypad enter
 	
 	// Build inverse numpad map
-	for (iter = mTranslateNumpadMap.begin(); iter != mTranslateNumpadMap.end(); iter++)
+	for (auto iter = mTranslateNumpadMap.begin(); iter != mTranslateNumpadMap.end(); iter++)
 	{
 		mInvTranslateNumpadMap[iter->second] = iter->first;
 	}
@@ -279,7 +278,7 @@ MASK LLKeyboardMacOSX::currentMask(BOOL for_mouse_event)
 
 void LLKeyboardMacOSX::scanKeyboard()
 {
-	S32 key;
+	U32 key;
 	for (key = 0; key < KEY_COUNT; key++)
 	{
 		// Generate callback if any event has occurred on this key this frame.
diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h
index 84d1858379ab400ebae7e06de2fb542cabcf10ea..d75d5b9c27de218219cf29b2da9115ce38e2d0e7 100644
--- a/indra/llwindow/llwindowmacosx-objc.h
+++ b/indra/llwindow/llwindowmacosx-objc.h
@@ -126,8 +126,8 @@ void setupInputWindow(NSWindowRef window, GLViewRef view);
 
 // These are all implemented in llwindowmacosx.cpp.
 // This is largely for easier interop between Obj-C and C++ (at least in the viewer's case due to the BOOL vs. BOOL conflict)
-bool callKeyUp(NSKeyEventRef event, unsigned short key, unsigned int mask);
-bool callKeyDown(NSKeyEventRef event, unsigned short key, unsigned int mask);
+bool callKeyUp(NSKeyEventRef event, unsigned int key, unsigned int mask);
+bool callKeyDown(NSKeyEventRef event, unsigned int key, unsigned int mask);
 void callResetKeys();
 bool callUnicodeCallback(wchar_t character, unsigned int mask);
 void callRightMouseDown(float *pos, unsigned int mask);
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index 5f89bf92b0862a3f13385c8a9c51885de5912070..4fce441262ac54b52fe5fb9e24348bc2380f9e2b 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -197,7 +197,7 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
 // These functions are used as wrappers for our internal event handling callbacks.
 // It's a good idea to wrap these to avoid reworking more code than we need to within LLWindow.
 
-bool callKeyUp(NSKeyEventRef event, unsigned short key, unsigned int mask)
+bool callKeyUp(NSKeyEventRef event, unsigned int key, unsigned int mask)
 {
     mRawKeyEvent = event;
 	bool retVal = gKeyboard->handleKeyUp(key, mask);
@@ -205,7 +205,7 @@ bool callKeyUp(NSKeyEventRef event, unsigned short key, unsigned int mask)
     return retVal;
 }
 
-bool callKeyDown(NSKeyEventRef event, unsigned short key, unsigned int mask)
+bool callKeyDown(NSKeyEventRef event, unsigned int key, unsigned int mask)
 {
     mRawKeyEvent = event;
 	bool retVal = gKeyboard->handleKeyDown(key, mask);