This toggles the keys (you have to change the german labels):
tell application "System Events"
tell application "System Preferences"
reveal anchor "keyboardTab" of pane "com.apple.preference.keyboard"
end tell
tell window 1 of application process "System Preferences"
click button "Sondertasten …" of tab group 1
tell sheet 1
tell pop up button "Feststelltaste (⇪):"
set state to value
click
delay 0.2
if "Feststelltaste" is in state then
click menu item "⌃ ctrl-Taste" of menu 1
else
click menu item "⇪ Feststelltaste" of menu 1
end if
delay 0.2
end tell
click button "OK"
end tell
end tell
end tell
if application "System Preferences" is running then
tell application "System Preferences" to quit
end if
But as foo wrote, GUI-Scripts should be the last solution. Especially in Mavericks it's really annoying because you have to enable access for assistive devices for every single app (and again if you change your script).