#122 - OnModified state handling

- added "On key pressed" handler
- and handle of modified state

Something wrong with operation manage of diagrams :(