# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: nvda@acrodelon.com-20101028062420-8z6wtkp95rvdcbym
# target_branch: http://bzr.nvaccess.org/nvda/main/
# testament_sha1: 80233803aa893a0b35ad7f4ac1c9fe0c5e1481b1
# timestamp: 2010-10-28 12:00:13 +0530
# base_revision_id: jamie@jantrid.net-20101014053205-ub2fqrsoq37npa8p
# 
# Begin patch
=== modified file 'source/NVDAObjects/__init__.py'
--- source/NVDAObjects/__init__.py	2010-08-30 04:19:52 +0000
+++ source/NVDAObjects/__init__.py	2010-10-28 06:24:20 +0000
@@ -704,6 +704,7 @@
 
 	def event_typedCharacter(self,ch):
 		speech.speakTypedCharacters(ch)
+		speech.beepCapitals(ch)
 
 
 	def event_mouseMove(self,x,y):

=== modified file 'source/config/__init__.py'
--- source/config/__init__.py	2010-09-15 06:11:19 +0000
+++ source/config/__init__.py	2010-10-28 06:24:20 +0000
@@ -114,6 +114,7 @@
 	keyboardLayout = string(default="desktop")
 	speakTypedCharacters = boolean(default=true)
 	speakTypedWords = boolean(default=false)
+	beepLowercaseLetters=boolean(default=false)
 	speakCommandKeys = boolean(default=false)
 
 [virtualBuffers]

=== modified file 'source/gui/settingsDialogs.py'
--- source/gui/settingsDialogs.py	2010-09-24 08:18:46 +0000
+++ source/gui/settingsDialogs.py	2010-10-28 06:24:20 +0000
@@ -462,6 +462,9 @@
 		self.wordsCheckBox=wx.CheckBox(self,wx.NewId(),label=_("Speak typed &words"))
 		self.wordsCheckBox.SetValue(config.conf["keyboard"]["speakTypedWords"])
 		settingsSizer.Add(self.wordsCheckBox,border=10,flag=wx.BOTTOM)
+		self.beepLowercaseCheckBox=wx.CheckBox(self,wx.NewId(),label=_("Beep if typing lowercase letters when caps lock is on"))
+		self.beepLowercaseCheckBox.SetValue(config.conf["keyboard"]["beepLowercaseLetters"])
+		settingsSizer.Add(self.beepLowercaseCheckBox,border=10,flag=wx.BOTTOM)
 		self.commandKeysCheckBox=wx.CheckBox(self,wx.NewId(),label=_("Speak command &keys"))
 		self.commandKeysCheckBox.SetValue(config.conf["keyboard"]["speakCommandKeys"])
 		settingsSizer.Add(self.commandKeysCheckBox,border=10,flag=wx.BOTTOM)
@@ -481,6 +484,7 @@
 		config.conf["keyboard"]["useExtendedInsertAsNVDAModifierKey"]=self.extendedInsertAsNVDAModifierCheckBox.IsChecked()
 		config.conf["keyboard"]["speakTypedCharacters"]=self.charsCheckBox.IsChecked()
 		config.conf["keyboard"]["speakTypedWords"]=self.wordsCheckBox.IsChecked()
+		config.conf["keyboard"]["beepLowercaseLetters"]=self.beepLowercaseCheckBox.IsChecked()
 		config.conf["keyboard"]["speakCommandKeys"]=self.commandKeysCheckBox.IsChecked()
 		super(KeyboardSettingsDialog, self).onOk(evt)
 

=== modified file 'source/speech.py'
--- source/speech.py	2010-10-04 03:52:57 +0000
+++ source/speech.py	2010-10-28 06:24:20 +0000
@@ -394,6 +394,20 @@
 					text=processSymbol(text)
 				speakSelectionMessage(_("selected %s"),text)
 
+
+def beepCapitals(ch):
+	import winUser
+	if config.conf["keyboard"]["beepLowercaseLetters"]:
+		state = winUser.getKeyState(winUser.VK_CAPITAL)
+		if state in [1, -127]:
+				capsOn=1
+		else:
+				capsOn=0
+
+		if (capsOn==1 and ch.islower()):
+				tones.beep(2000,50)
+
+
 def speakTypedCharacters(ch):
 	global curWordChars;
 	if api.isTypingProtected():

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWYSmMuIAA+TfgEAyUmf/938v
zw6////wYAf8FfA6AAdTM0A7d3QGlcJKoemghhTTJ5TNTT1DTQ9QeptTahoA0yAJKU0ek00yntR6
FND1NPTUDQBkZNNAAAcwBGCYgGATBNGQ0MAmCMTDEIk9RppqntTSep+qbSaaAw0QBgj9Q01DTHMA
RgmIBgEwTRkNDAJgjEwkkARNMmgDSZJpppiaNEzSZT09KeoabU2ogCxBRSSIc2IC1Mkhusrb4RSR
w8TgFPRI7tCHFBnjR0d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