You can certainly respond to selection events with either JavaScript code (in a pure standalone HTML file) or with Python code (requires running a Bokeh server application). It’s not clear which of those you want. It’s not clear if you want the index coordinates of the matrix as the selection, or if you want the data coordinates of the selection geometry. Does “open a window” literally mean raise a separate browser window? AFAIK you would have to pass a real URL to window.open to do that. If that’s the case I think you’d have to run a Bokeh server application and pass some encoded data as an HTTP argument in the URL to condition what exactly to render on the new page (i.e. based on the selection somehow).